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

Unified Diff: third_party/WebKit/Source/core/css/CSSSelector.h

Issue 2272683002: Consider pseudo classes as matching for shared style rejection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handle negated selectors Created 4 years, 4 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 | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSSelector.h
diff --git a/third_party/WebKit/Source/core/css/CSSSelector.h b/third_party/WebKit/Source/core/css/CSSSelector.h
index 766005b1d82533949068e5014dfce4c3c20a4c9a..c7dd1b97ea55890b778acbe1676c2c68c1120d79 100644
--- a/third_party/WebKit/Source/core/css/CSSSelector.h
+++ b/third_party/WebKit/Source/core/css/CSSSelector.h
@@ -260,6 +260,7 @@ public:
bool isShadowSelector() const { return m_relation == ShadowPseudo || m_relation == ShadowDeep; }
bool isAttributeSelector() const { return m_match >= FirstAttributeSelectorMatch; }
bool isHostPseudoClass() const { return m_pseudoType == PseudoHost || m_pseudoType == PseudoHostContext; }
+ bool isUserActionPseudoClass() const;
bool isInsertionPointCrossing() const { return m_pseudoType == PseudoHostContext || m_pseudoType == PseudoContent; }
RelationType relation() const { return static_cast<RelationType>(m_relation); }
@@ -483,6 +484,14 @@ inline const AtomicString& CSSSelector::serializingValue() const
return *reinterpret_cast<const AtomicString*>(&m_data.m_value);
}
+inline bool CSSSelector::isUserActionPseudoClass() const
+{
+ return m_pseudoType == PseudoHover
+ || m_pseudoType == PseudoActive
+ || m_pseudoType == PseudoFocus
+ || m_pseudoType == PseudoDrag;
+}
+
} // namespace blink
#endif // CSSSelector_h
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698