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

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

Issue 1602833002: No pseudo elements in SelectorChecker::Mode QueryingRules. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-pseudoelm-check-2-20160118
Patch Set: Another review issue Created 4 years, 11 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
Index: third_party/WebKit/Source/core/css/SelectorChecker.cpp
diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.cpp b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
index bf2ba92305e3eab9f58fbd1d6c6458405034ba63..8d1af412283c04a8c363c51b3ad208eb9f18bbda 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -1066,17 +1066,13 @@ bool SelectorChecker::checkPseudoElement(const SelectorCheckingContext& context,
case CSSSelector::PseudoShadow:
return element.isInShadowTree() && context.previousElement;
default:
- break;
- }
-
- if (m_mode == QueryingRules)
- return false;
- if (m_mode == SharingRules)
+ if (m_mode == SharingRules)
+ return true;
+ ASSERT(m_mode != QueryingRules);
+ result.dynamicPseudo = CSSSelector::pseudoId(selector.pseudoType());
+ ASSERT(result.dynamicPseudo != NOPSEUDO);
return true;
-
- result.dynamicPseudo = CSSSelector::pseudoId(selector.pseudoType());
- ASSERT(result.dynamicPseudo != NOPSEUDO);
- return true;
+ }
}
bool SelectorChecker::checkPseudoHost(const SelectorCheckingContext& context, MatchResult& result) const
« no previous file with comments | « third_party/WebKit/Source/core/css/SelectorChecker.h ('k') | third_party/WebKit/Source/core/dom/SelectorQuery.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698