Index: third_party/WebKit/Source/core/css/RuleSet.cpp |
diff --git a/third_party/WebKit/Source/core/css/RuleSet.cpp b/third_party/WebKit/Source/core/css/RuleSet.cpp |
index 42962a163bd9683a5086e89d1dfbedfc6b8382d0..663371ae1e0e3f8130f6b1480ed4385491360480 100644 |
--- a/third_party/WebKit/Source/core/css/RuleSet.cpp |
+++ b/third_party/WebKit/Source/core/css/RuleSet.cpp |
@@ -78,6 +78,12 @@ static bool containsUncommonAttributeSelector(const CSSSelector& selector) |
return true; |
if (selectorListContainsUncommonAttributeSelector(current)) |
return true; |
+ if (current->relationIsAffectedByPseudoContent() |
+ || current->pseudoType() == CSSSelector::PseudoHost |
+ || current->pseudoType() == CSSSelector::PseudoHostContext |
+ || current->pseudoType() == CSSSelector::PseudoSlotted) { |
+ return false; |
+ } |
if (current->relation() != CSSSelector::SubSelector) { |
current = current->tagHistory(); |
break; |