Index: third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp |
diff --git a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp |
index bc452d94e3014ea1b8a639c0c146f435a4efc1c8..d728130d19768b8da84cfb46b3106ab3561f1209 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp |
@@ -173,6 +173,7 @@ bool IsUserActionPseudoClass(CSSSelector::PseudoType pseudo) { |
switch (pseudo) { |
case CSSSelector::kPseudoHover: |
case CSSSelector::kPseudoFocus: |
+ case CSSSelector::kPseudoFocusWithin: |
case CSSSelector::kPseudoActive: |
return true; |
default: |
@@ -443,6 +444,10 @@ std::unique_ptr<CSSParserSelector> CSSSelectorParser::ConsumePseudo( |
bool has_arguments = token.GetType() == kFunctionToken; |
selector->UpdatePseudoType(value, has_arguments); |
+ if (!RuntimeEnabledFeatures::cssSelectorsFocusWithinEnabled() && |
+ selector->GetPseudoType() == CSSSelector::kPseudoFocusWithin) |
+ return nullptr; |
+ |
if (selector->Match() == CSSSelector::kPseudoElement && |
disallow_pseudo_elements_) |
return nullptr; |