Title: [171058] trunk/Source/WebCore
Revision
171058
Author
[email protected]
Date
2014-07-13 14:46:07 -0700 (Sun, 13 Jul 2014)

Log Message

Remove an useless check from SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=134868

Reviewed by Darin Adler.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
The condition of this if() branch can never be met for the mode "QueryingRules".

The next condition in that if() is "dynamicPseudo != NOPSEUDO", which implies
a pseudo element was matched prior to the current context/simple selector.
This cannot happen with QueryingRules, since we never match pseudo elements for
SelectorQuery.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (171057 => 171058)


--- trunk/Source/WebCore/ChangeLog	2014-07-13 19:39:45 UTC (rev 171057)
+++ trunk/Source/WebCore/ChangeLog	2014-07-13 21:46:07 UTC (rev 171058)
@@ -1,3 +1,19 @@
+2014-07-13  Benjamin Poulain  <[email protected]>
+
+        Remove an useless check from SelectorChecker
+        https://bugs.webkit.org/show_bug.cgi?id=134868
+
+        Reviewed by Darin Adler.
+
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::matchRecursively):
+        The condition of this if() branch can never be met for the mode "QueryingRules".
+
+        The next condition in that if() is "dynamicPseudo != NOPSEUDO", which implies
+        a pseudo element was matched prior to the current context/simple selector.
+        This cannot happen with QueryingRules, since we never match pseudo elements for
+        SelectorQuery.
+
 2014-07-12  Nikos Andronikos  <[email protected]>
 
         Elements with rendering disabled due to dimensions should not contribute to parent bounding box

Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (171057 => 171058)


--- trunk/Source/WebCore/css/SelectorChecker.cpp	2014-07-13 19:39:45 UTC (rev 171057)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp	2014-07-13 21:46:07 UTC (rev 171058)
@@ -275,7 +275,7 @@
         // to follow the pseudo elements.
         nextContext.hasScrollbarPseudo = dynamicPseudo != NOPSEUDO && (context.scrollbar || dynamicPseudo == SCROLLBAR_CORNER || dynamicPseudo == RESIZER);
         nextContext.hasSelectionPseudo = dynamicPseudo == SELECTION;
-        if ((context.elementStyle || m_mode == Mode::CollectingRules || m_mode == Mode::QueryingRules) && dynamicPseudo != NOPSEUDO
+        if ((context.elementStyle || m_mode == Mode::CollectingRules) && dynamicPseudo != NOPSEUDO
             && !nextContext.hasSelectionPseudo
             && !(nextContext.hasScrollbarPseudo && nextContext.selector->m_match == CSSSelector::PseudoClass))
             return SelectorFailsCompletely;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to