[Pkg-mozext-commits] [firebug] 58/68: Correct fix for issue 6451 (Pseudo-element rules not applying to elements are displayed) http://code.google.com/p/fbug/issues/detail?id=6451

David Prévot taffit at moszumanska.debian.org
Mon Mar 31 22:45:54 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 b3219b2a114a1c7286bfe1c90e74fcbb226e30f2
Author: Sebastian Zartner <sebastianzartner at gmail.com>
Date:   Mon May 20 22:49:44 2013 +0200

    Correct fix for issue 6451 (Pseudo-element rules not applying to
    elements are displayed)
    http://code.google.com/p/fbug/issues/detail?id=6451
---
 extension/content/firebug/css/stylePanel.js | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/extension/content/firebug/css/stylePanel.js b/extension/content/firebug/css/stylePanel.js
index 7d0b994..aaf71e3 100644
--- a/extension/content/firebug/css/stylePanel.js
+++ b/extension/content/firebug/css/stylePanel.js
@@ -223,6 +223,11 @@ CSSStylePanel.prototype = Obj.extend(CSSStyleSheetPanel.prototype,
     // All calls to this method must call cleanupSheets first
     getElementRules: function(element, rules, usedProps, inheritMode)
     {
+        function filterMozPseudoElements(pseudoElement)
+        {
+            return !Str.hasPrefix(pseudoElement, "::-moz");
+        }
+
         var pseudoElements = [""];
         var inspectedRules, displayedRules = {};
 
@@ -230,15 +235,15 @@ CSSStylePanel.prototype = Obj.extend(CSSStyleSheetPanel.prototype,
         if (!inheritMode)
             pseudoElements = Arr.extendArray(pseudoElements, Css.pseudoElements);
 
+        // xxxsz: Do not show Mozilla-specific pseudo-elements for now (see issue 6451)
+        // Pseudo-element rules just apply to specific elements, so we need a way to find out
+        // which elements that are
+        pseudoElements = pseudoElements.filter(filterMozPseudoElements);
+        
         // The domUtils API requires the pseudo-element selectors to be prefixed by only one colon 
         pseudoElements.forEach(function(pseudoElement, i)
         {
-            // xxxsz: Do not show Mozilla-specific pseudo-elements for now (see issue 6451)
-            // Pseudo-element rules just apply to specific elements, so we need a way to find out
-            // which elements that are
-            if (Str.hasPrefix(pseudoElement, "::-moz"))
-                pseudoElements.splice(i, 1);
-            else if (Str.hasPrefix(pseudoElement, "::"))
+            if (Str.hasPrefix(pseudoElement, "::"))
                 pseudoElements[i] = pseudoElement.substr(1);
         });
 

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