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 |