Fix for bug 6666, pseudo-element rules incorrectly displayed
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Jan 2006 03:47:52 +0000 (03:47 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Jan 2006 03:47:52 +0000 (03:47 +0000)
        in Web Inspector.

        Reviewed by darin

        Added fast/inspector/matchedrules.html as test case.

        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::matchRulesForList):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12271 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/css/cssstyleselector.cpp

index e93c8a1..f44f6cb 100644 (file)
@@ -1,3 +1,15 @@
+2006-01-20  David Hyatt  <hyatt@apple.com>
+
+        Fix for bug 6666, pseudo-element rules incorrectly displayed
+        in Web Inspector.
+        
+        Reviewed by darin
+
+        Added fast/inspector/matchedrules.html as test case.
+
+        * css/cssstyleselector.cpp:
+        (WebCore::CSSStyleSelector::matchRulesForList):
+
 2006-01-20  Timothy Hatcher  <timothy@apple.com>
 
         Reviewed by John.
index c1183d0..613e3ca 100644 (file)
@@ -399,9 +399,11 @@ void CSSStyleSelector::matchRulesForList(CSSRuleDataList* rules,
             
             // If we're matching normal rules, set a pseudo bit if 
             // we really just matched a pseudo-element.
-            if (!m_collectRulesOnly && dynamicPseudo != RenderStyle::NOPSEUDO && pseudoStyle == RenderStyle::NOPSEUDO)
+            if (dynamicPseudo != RenderStyle::NOPSEUDO && pseudoStyle == RenderStyle::NOPSEUDO) {
+                if (m_collectRulesOnly)
+                    return;
                 style->setHasPseudoStyle(dynamicPseudo);
-            else {
+            else {
                 // Update our first/last rule indices in the matched rules array.
                 lastRuleIndex = m_matchedDeclCount + m_matchedRuleCount;
                 if (firstRuleIndex == -1) firstRuleIndex = m_matchedDeclCount + m_matchedRuleCount;