Title: [173646] trunk/Source/WebCore
- Revision
- 173646
- Author
- [email protected]
- Date
- 2014-09-15 19:30:17 -0700 (Mon, 15 Sep 2014)
Log Message
Return early in SelectorChecker::checkOne() if selector.isAttributeSelector() is true
https://bugs.webkit.org/show_bug.cgi?id=136838
Reviewed by Benjamin Poulain.
Return early in SelectorChecker::checkOne() if selector.isAttributeSelector()
is true and the selector matched. Previously, we were only returning early if
the selector did not match and we were falling through if it did. This means
that we ended up doing the 2 if() checks below in the method unnecessarily:
- selector.m_match == CSSSelector::PseudoClass
- selector.m_match == CSSSelector::PseudoElement
No new tests, no behavior change.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (173645 => 173646)
--- trunk/Source/WebCore/ChangeLog 2014-09-16 02:24:35 UTC (rev 173645)
+++ trunk/Source/WebCore/ChangeLog 2014-09-16 02:30:17 UTC (rev 173646)
@@ -1,5 +1,24 @@
2014-09-15 Chris Dumez <[email protected]>
+ Return early in SelectorChecker::checkOne() if selector.isAttributeSelector() is true
+ https://bugs.webkit.org/show_bug.cgi?id=136838
+
+ Reviewed by Benjamin Poulain.
+
+ Return early in SelectorChecker::checkOne() if selector.isAttributeSelector()
+ is true and the selector matched. Previously, we were only returning early if
+ the selector did not match and we were falling through if it did. This means
+ that we ended up doing the 2 if() checks below in the method unnecessarily:
+ - selector.m_match == CSSSelector::PseudoClass
+ - selector.m_match == CSSSelector::PseudoElement
+
+ No new tests, no behavior change.
+
+ * css/SelectorChecker.cpp:
+ (WebCore::SelectorChecker::checkOne):
+
+2014-09-15 Chris Dumez <[email protected]>
+
Un-inline the Node constructor
https://bugs.webkit.org/show_bug.cgi?id=136842
Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (173645 => 173646)
--- trunk/Source/WebCore/css/SelectorChecker.cpp 2014-09-16 02:24:35 UTC (rev 173645)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp 2014-09-16 02:30:17 UTC (rev 173646)
@@ -512,8 +512,7 @@
const QualifiedName& attr = selector->attribute();
bool caseSensitive = !(m_documentIsHTML && element->isHTMLElement()) || HTMLDocument::isCaseSensitiveAttribute(attr);
- if (!anyAttributeMatches(element, selector, attr, caseSensitive))
- return false;
+ return anyAttributeMatches(element, selector, attr, caseSensitive);
}
if (selector->match() == CSSSelector::PseudoClass) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes