Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Unified Diff: Source/core/css/SelectorChecker.cpp

Issue 319513005: Return early in SelectorChecker::checkOne() if selector.isAttributeSelector() is true (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/SelectorChecker.cpp
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
index 93df85b4e9c245d58229a8b0be98af02b2e93082..015bda730c7d0c8e77308efb4a7501bc624a78f0 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -548,10 +548,8 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib
if (selector.m_match == CSSSelector::Id)
return element.hasID() && element.idForStyleResolution() == selector.value();
- if (selector.isAttributeSelector()) {
- if (!anyAttributeMatches(element, static_cast<CSSSelector::Match>(selector.m_match), selector))
- return false;
- }
+ if (selector.isAttributeSelector())
+ return anyAttributeMatches(element, static_cast<CSSSelector::Match>(selector.m_match), selector);
if (selector.m_match == CSSSelector::PseudoClass) {
// Handle :not up front.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698