[Pkg-mozext-commits] [firebug] 16/59: Issue 7604 (Unrecognized CSS rule types break the display within the CSS and the DOM panel) https://code.google.com/p/fbug/issues/detail?id=7604
David Prévot
taffit at moszumanska.debian.org
Thu Aug 14 14:52:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firebug.
commit 6acfe1c600e8b89944a32968da78fae6626c1b3f
Author: Sebastian Zartner <sebastianzartner at gmail.com>
Date: Thu Jul 24 10:53:16 2014 +0200
Issue 7604 (Unrecognized CSS rule types break the display within the CSS
and the DOM panel)
https://code.google.com/p/fbug/issues/detail?id=7604
---
extension/content/firebug/chrome/reps.js | 14 ++++++++++++--
extension/content/firebug/css/cssPanel.js | 12 ++++++------
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/extension/content/firebug/chrome/reps.js b/extension/content/firebug/chrome/reps.js
index ec24953..fe5173e 100644
--- a/extension/content/firebug/chrome/reps.js
+++ b/extension/content/firebug/chrome/reps.js
@@ -1730,7 +1730,12 @@ FirebugReps.CSSRule = domplate(Rep,
{
return "CSSPageRule";
}
- else if (rule instanceof window.CSSNameSpaceRule)
+ // Workaround for https://bugzil.la/754772
+ // All types of CSS rules are currently recognized as CSSNameSpaceRules,
+ // so we explicitly need to check whether the rule's type is NAMESPACE_RULE
+ // to ensure that the rule is really an @namespace rule
+ else if (rule instanceof window.CSSNameSpaceRule &&
+ rule.type === window.CSSRule.NAMESPACE_RULE)
{
return "CSSNameSpaceRule";
}
@@ -1781,7 +1786,12 @@ FirebugReps.CSSRule = domplate(Rep,
{
return rule.selectorText || "";
}
- else if (rule instanceof window.CSSNameSpaceRule)
+ // Workaround for https://bugzil.la/754772
+ // All types of CSS rules are currently recognized as CSSNameSpaceRules,
+ // so we explicitly need to check whether the rule's type is NAMESPACE_RULE
+ // to ensure that the rule is really an @namespace rule
+ else if (rule instanceof window.CSSNameSpaceRule &&
+ rule.type === window.CSSRule.NAMESPACE_RULE)
{
var reNamespace = /^@namespace (.+ )?url\("(.*?)"\);$/;
var namespace = rule.cssText.match(reNamespace);
diff --git a/extension/content/firebug/css/cssPanel.js b/extension/content/firebug/css/cssPanel.js
index 6784d40..3f7a704 100644
--- a/extension/content/firebug/css/cssPanel.js
+++ b/extension/content/firebug/css/cssPanel.js
@@ -551,13 +551,13 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Panel,
isSystemSheet: isSystemSheet
});
}
- else if (rule instanceof window.CSSNameSpaceRule)
+ // Workaround for https://bugzil.la/754772
+ // All types of CSS rules are currently recognized as CSSNameSpaceRules,
+ // so we explicitly need to check whether the rule's type is NAMESPACE_RULE
+ // to ensure that the rule is really an @namespace rule
+ else if (rule instanceof window.CSSNameSpaceRule &&
+ rule.type === window.CSSRule.NAMESPACE_RULE)
{
- // Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=754772
- // MozCSSKeyframesRules, MozCSSKeyframeRules and CSSPageRules are recognized
- // as CSSNameSpaceRules, so explicitly check whether the rule is not a
- // MozCSSKeyframesRule, a MozCSSKeyframeRule or a CSSPageRule
-
var reNamespace = /^@namespace ((.+) )?url\("(.*?)"\);$/;
var namespace = rule.cssText.match(reNamespace);
var prefix = namespace[2] || "";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git
More information about the Pkg-mozext-commits
mailing list