[Pkg-mozext-commits] [firexpath] 09/51: 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
Sun Mar 22 15:08:50 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firexpath.
commit 446739327fecfc885ea7b8e6a4669d83a761c31b
Author: pierre.tholence at gmail.com <pierre.tholence at gmail.com@dfa30af4-1965-11df-8728-136f2c2ca76e>
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.
git-svn-id: http://firepath.googlecode.com/svn/trunk@12 dfa30af4-1965-11df-8728-136f2c2ca76e
---
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