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

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

Issue 2305593002: Refactored invalidation set extraction. (Closed)
Patch Set: Fixed comment Created 4 years, 3 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 | third_party/WebKit/Source/core/css/RuleFeature.h » ('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 c7dd1b97ea55890b778acbe1676c2c68c1120d79..22378a0187aac4a27c6eb56da0cf2193529beeda 100644
--- a/third_party/WebKit/Source/core/css/CSSSelector.h
+++ b/third_party/WebKit/Source/core/css/CSSSelector.h
@@ -262,6 +262,7 @@ public:
bool isHostPseudoClass() const { return m_pseudoType == PseudoHost || m_pseudoType == PseudoHostContext; }
bool isUserActionPseudoClass() const;
bool isInsertionPointCrossing() const { return m_pseudoType == PseudoHostContext || m_pseudoType == PseudoContent; }
+ bool isIdClassOrAttributeSelector() const;
RelationType relation() const { return static_cast<RelationType>(m_relation); }
void setRelation(RelationType relation)
@@ -492,6 +493,13 @@ inline bool CSSSelector::isUserActionPseudoClass() const
|| m_pseudoType == PseudoDrag;
}
+inline bool CSSSelector::isIdClassOrAttributeSelector() const
+{
+ return isAttributeSelector()
+ || match() == CSSSelector::Id
+ || match() == CSSSelector::Class;
+}
+
} // namespace blink
#endif // CSSSelector_h
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/RuleFeature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698