mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 12:58:00 +01:00
Change the order of nodeset filter application in hint generation.
--HG-- branch : bootstrapped
This commit is contained in:
@@ -304,14 +304,12 @@ var Hints = Module("hints", {
|
|||||||
|
|
||||||
let mode = this._hintMode;
|
let mode = this._hintMode;
|
||||||
let res = util.evaluateXPath(mode.xpath, doc, null, true);
|
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;
|
let start = this._pageHints.length;
|
||||||
for (let elem in res) {
|
for (let elem in res) {
|
||||||
let hint = { elem: elem, showText: false };
|
let hint = { elem: elem, showText: false };
|
||||||
|
|
||||||
if (!isVisible(elem))
|
if (!isVisible(elem) || mode.filter && !mode.filter(elem))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (elem.hasAttributeNS(NS, "hint"))
|
if (elem.hasAttributeNS(NS, "hint"))
|
||||||
|
|||||||
Reference in New Issue
Block a user