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

Unified Diff: third_party/WebKit/Source/core/css/CSSSelector.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/CSSSelector.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSSelector.cpp b/third_party/WebKit/Source/core/css/CSSSelector.cpp
index f660e57faa3644ad688fd21665facfa3100c9665..4a2e23e280e2ee596e9c5c29b028b6d874f15b5d 100644
--- a/third_party/WebKit/Source/core/css/CSSSelector.cpp
+++ b/third_party/WebKit/Source/core/css/CSSSelector.cpp
@@ -881,6 +881,17 @@ bool CSSSelector::matchNth(int count) const
return m_data.m_rareData->matchNth(count);
}
+bool CSSSelector::matchesPseudoElement() const
+{
+ for (const CSSSelector* current = this; current; current = current->tagHistory()) {
+ if (current->match() == PseudoElement)
+ return true;
+ if (current->relation() != SubSelector)
+ return false;
+ }
+ return false;
+}
+
CSSSelector::RareData::RareData(const AtomicString& value)
: m_matchingValue(value)
, m_serializingValue(value)
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSelector.h ('k') | third_party/WebKit/Source/core/css/SelectorChecker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698