[Pkg-mozext-commits] [firexpath] 08/18: Issue 4 the namespace of html nodes is no longer null in Firefox 3.6. It is now taken into account when figuring out if the highlight button needs to be disabled.

David Prévot taffit at moszumanska.debian.org
Sat Mar 26 19:35:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag FirePath-0.9.5
in repository firexpath.

commit 9d0e91df8fcbf990f2a001c65e4951ee0c543e46
Author: pierre.tholence <pierre.tholence at gmail.com>
Date:   Sun Aug 8 19:36:06 2010 +0000

    Issue 4 the namespace of html nodes is no longer null in Firefox 3.6. It is now taken into account when figuring out if the highlight button needs to be disabled.
---
 content/XPathPanel.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/content/XPathPanel.js b/content/XPathPanel.js
index f73a7e9..6035e2c 100644
--- a/content/XPathPanel.js
+++ b/content/XPathPanel.js
@@ -28,6 +28,8 @@ const prefRegExp = new RegExp(panelName + "\.(.*)");
 
 const defaultTimePeriod = 100;
 
+const xhtmlNS = 'http://www.w3.org/1999/xhtml';
+
 // ************************************************************************************************
 // XPath Tokens from XPath V1 W3C Recommendation on http://www.w3.org/TR/xpath
 
@@ -1673,7 +1675,7 @@ Firebug.XPathPanel.ResultHighlightModule = extend(Firebug.Module,
 	
 	refreshHighlightButton: function(panel) {
 		if(panel.evaluationResult != null && isArray(panel.evaluationResult) &&
-			panel.evaluationResult.some(function(e) {return e.nodeType == 1 && e.namespaceURI == null})) 
+			panel.evaluationResult.some(function(e) {return e.nodeType == 1 && (e.namespaceURI == null || e.namespaceURI == xhtmlNS)})) 
 		{
 			this.highlightButton.setAttribute("checked", !panel.context.xPathResultNotHighlighted);
 			this.highlightButton.setAttribute("disabled", false);
@@ -1713,7 +1715,7 @@ Firebug.XPathPanel.ResultHighlightModule = extend(Firebug.Module,
 			var head = doc.getElementsByTagName("head")[0]
 			if(head) {
 				if(!context.fireXPathStyleSheet) {
-					var styleSheet = document.createElementNS("http://www.w3.org/1999/xhtml", "style");
+					var styleSheet = document.createElementNS(xhtmlNS, "style");
 					styleSheet.firebugIgnore = true;
 					styleSheet.setAttribute("type", "text/css");
 					styleSheet.setAttribute("id", "firexpath-matching-node-style");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firexpath.git



More information about the Pkg-mozext-commits mailing list