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

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: CORE_EXPORT for unit test in component build 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 d63496031445f2ea8453b3705866c72354db212a..c253b5e9a75f01150f66080d628d627930e37d22 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -1074,17 +1074,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

Powered by Google App Engine
This is Rietveld 408576698