[Pkg-mozext-commits] [firebug] 09/68: Issue 6281: Placeholder rules are no longer displayed in HTML Style tab http://code.google.com/p/fbug/issues/detail?id=6281

David Prévot taffit at moszumanska.debian.org
Mon Mar 31 22:45:49 UTC 2014


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

taffit pushed a commit to tag fbtest-1.11.4
in repository firebug.

commit 73270b854b2281546121a7c7a69f6be23dc1de36
Author: Sebastian Zartner <sebastianzartner at gmail.com>
Date:   Wed Feb 20 23:43:48 2013 +0100

    Issue 6281: Placeholder rules are no longer displayed in HTML Style
    tab
    http://code.google.com/p/fbug/issues/detail?id=6281
---
 extension/content/firebug/css/stylePanel.js | 18 +++++++++++-------
 extension/content/firebug/lib/css.js        |  3 ++-
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/extension/content/firebug/css/stylePanel.js b/extension/content/firebug/css/stylePanel.js
index 51379d4..78896ca 100644
--- a/extension/content/firebug/css/stylePanel.js
+++ b/extension/content/firebug/css/stylePanel.js
@@ -15,6 +15,7 @@ define([
     "firebug/lib/dom",
     "firebug/lib/css",
     "firebug/lib/xpath",
+    "firebug/lib/string",
     "firebug/lib/fonts",
     "firebug/lib/options",
     "firebug/css/cssModule",
@@ -22,7 +23,7 @@ define([
     "firebug/chrome/menu"
 ],
 function(Obj, Firebug, Firefox, Domplate, FirebugReps, Xpcom, Locale, Events, Url, Arr,
-    SourceLink, Dom, Css, Xpath, Fonts, Options, CSSModule, CSSStyleSheetPanel, Menu) {
+    SourceLink, Dom, Css, Xpath, Str, Fonts, Options, CSSModule, CSSStyleSheetPanel, Menu) {
 
 with (Domplate) {
 
@@ -33,9 +34,6 @@ const Cc = Components.classes;
 const Ci = Components.interfaces;
 const nsIDOMCSSStyleRule = Ci.nsIDOMCSSStyleRule;
 
-// before firefox 6 getCSSStyleRules accepted only one argument
-const DOMUTILS_SUPPORTS_PSEUDOELEMENTS = Dom.domUtils.getCSSStyleRules.length > 1;
-
 // See: http://mxr.mozilla.org/mozilla1.9.2/source/content/events/public/nsIEventStateManager.h#153
 const STATE_ACTIVE  = 0x01;
 const STATE_FOCUS   = 0x02;
@@ -227,9 +225,15 @@ CSSStylePanel.prototype = Obj.extend(CSSStyleSheetPanel.prototype,
         var inspectedRules, displayedRules = {};
 
         // Firefox 6+ allows inspecting of pseudo-elements (see issue 537)
-        if (DOMUTILS_SUPPORTS_PSEUDOELEMENTS && !inheritMode)
-            pseudoElements = Arr.extendArray(pseudoElements,
-                [":first-letter", ":first-line", ":before", ":after"]);
+        if (!inheritMode)
+            pseudoElements = Arr.extendArray(pseudoElements, Css.pseudoElements);
+
+        // The domUtils API requires the pseudo-element selectors to be prefixed by only one colon 
+        pseudoElements.forEach(function(pseudoElement, i)
+        {
+        	if (Str.hasPrefix(pseudoElement, "::"))
+                pseudoElements[i] = pseudoElement.substr(1);
+        });
 
         for (var p in pseudoElements)
         {
diff --git a/extension/content/firebug/lib/css.js b/extension/content/firebug/lib/css.js
index 2f5da52..0f17ffa 100644
--- a/extension/content/firebug/lib/css.js
+++ b/extension/content/firebug/lib/css.js
@@ -2708,7 +2708,8 @@ Css.pseudoElements =
     "::-moz-math-anonymous",
     "::-moz-math-stretchy",
     "::-moz-progress-bar",
-    "::-moz-selection"
+    "::-moz-selection",
+    "::-moz-placeholder"
 ];
 
 Css.nonEditableTags =

-- 
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