1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 10:47:58 +01:00

Change the order of nodeset filter application in hint generation.

--HG--
branch : bootstrapped
This commit is contained in:
Kris Maglione
2010-12-28 17:27:44 -05:00
parent e804d51448
commit 8abe4fd921

View File

@@ -304,14 +304,12 @@ var Hints = Module("hints", {
let mode = this._hintMode;
let res = util.evaluateXPath(mode.xpath, doc, null, true);
if (mode.filter)
res = let (orig = res) (e for (e in orig) if (mode.filter(e)));
let start = this._pageHints.length;
for (let elem in res) {
let hint = { elem: elem, showText: false };
if (!isVisible(elem))
if (!isVisible(elem) || mode.filter && !mode.filter(elem))
continue;
if (elem.hasAttributeNS(NS, "hint"))