Index: Source/core/css/SelectorChecker.h |
diff --git a/Source/core/css/SelectorChecker.h b/Source/core/css/SelectorChecker.h |
index 0e3357b94bab90fbc4b3090e64e89f2e16985189..1b5b76aeefc3276304edbddc331ef08edcb0082d 100644 |
--- a/Source/core/css/SelectorChecker.h |
+++ b/Source/core/css/SelectorChecker.h |
@@ -138,6 +138,7 @@ private: |
bool checkPseudoHost(const SelectorCheckingContext&, const SiblingTraversalStrategy&, unsigned*) const; |
static bool isFrameFocused(const Element&); |
+ bool shouldMatchHoverOrActive(const SelectorCheckingContext&) const; |
bool m_strictParsing; |
Mode m_mode; |
@@ -179,6 +180,11 @@ inline bool SelectorChecker::isHostInItsShadowTree(const Element& element, const |
return scope && scope->isInShadowTree() && scope->shadowHost() == element; |
} |
+inline bool SelectorChecker::shouldMatchHoverOrActive(const SelectorCheckingContext& context) const |
+{ |
+ return m_strictParsing || context.isSubSelector || (context.selector->relation() == CSSSelector::SubSelector && context.selector->tagHistory()) || context.element->isLink(); |
+} |
+ |
} |
#endif |