aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormrmr19932014-12-06 21:58:04 +0000
committermrmr19932014-12-06 21:58:04 +0000
commitdcc7e1ff5ae28b700e12ecf75d403001fc9c2152 (patch)
treed21d3f1679323e18ae7a50ede87f8ba86f6ec4e8 /lib
parentb6125a2b13d6927c10f381f51b207445fd3f049b (diff)
downloadvimium-dcc7e1ff5ae28b700e12ecf75d403001fc9c2152.tar.bz2
Only consider fullscreen elements' children for link hints
Diffstat (limited to 'lib')
-rw-r--r--lib/dom_utils.coffee6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee
index 21018049..5f316c08 100644
--- a/lib/dom_utils.coffee
+++ b/lib/dom_utils.coffee
@@ -33,13 +33,13 @@ DomUtils =
makeXPath: (elementArray) ->
xpath = []
for element in elementArray
- xpath.push("//" + element, "//xhtml:" + element)
+ xpath.push(".//" + element, ".//xhtml:" + element)
xpath.join(" | ")
- evaluateXPath: (xpath, resultType) ->
+ evaluateXPath: (xpath, resultType, contextNode = document.documentElement) ->
namespaceResolver = (namespace) ->
if (namespace == "xhtml") then "http://www.w3.org/1999/xhtml" else null
- document.evaluate(xpath, document.documentElement, namespaceResolver, resultType, null)
+ document.evaluate(xpath, contextNode, namespaceResolver, resultType, null)
#
# Returns the first visible clientRect of an element if it exists. Otherwise it returns null.