From 31510b5b643353506554b6fbd1f7b5b03543d940 Mon Sep 17 00:00:00 2001 From: John Foerch Date: Tue, 24 Nov 2009 15:53:42 -0500 Subject: [PATCH] next-heading, previous-heading: correct xpath lookup Was broken by a recent commit which added namespaces to the heading xpath expressions, but failed to put the xpath namespace lookup in the relevant document.evaluate call. --- modules/scroll.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/scroll.js b/modules/scroll.js index b0dd0e5..a8a32ef 100644 --- a/modules/scroll.js +++ b/modules/scroll.js @@ -25,10 +25,10 @@ define_variable("scroll_to_heading_wrap", true, define_browser_object_class("next-heading", null, function (I) { let xpr = I.buffer.document.evaluate( - I.local.headings_xpath, I.buffer.document, null, - Ci.nsIDOMXPathResult.ORDERED_NODE_ITERATOR_TYPE, null), - heading, found = null, foundtop = null, - first = null, firsttop = null; + I.local.headings_xpath, I.buffer.document, xpath_lookup_namespace, + Ci.nsIDOMXPathResult.ORDERED_NODE_ITERATOR_TYPE, null), + heading, found = null, foundtop = null, + first = null, firsttop = null; while ((heading = xpr.iterateNext())) { let rect = heading.getBoundingClientRect(); if (rect.bottom - rect.top < 2) @@ -53,10 +53,10 @@ define_browser_object_class("next-heading", null, define_browser_object_class("previous-heading", null, function (I) { let xpr = I.buffer.document.evaluate( - I.local.headings_xpath, I.buffer.document, null, - Ci.nsIDOMXPathResult.ORDERED_NODE_ITERATOR_TYPE, null), - heading, found = null, foundtop = null, - last = null, lasttop = null; + I.local.headings_xpath, I.buffer.document, xpath_lookup_namespace, + Ci.nsIDOMXPathResult.ORDERED_NODE_ITERATOR_TYPE, null), + heading, found = null, foundtop = null, + last = null, lasttop = null; while ((heading = xpr.iterateNext())) { let rect = heading.getBoundingClientRect(); if (rect.bottom - rect.top < 2) -- 2.11.4.GIT