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 e13b6e268a2a1d154b34867f1e8563be36574a48..3d19f18fafa137f28649470fec0ba735d8a81502 100644 |
--- a/third_party/WebKit/Source/core/css/RuleSet.cpp |
+++ b/third_party/WebKit/Source/core/css/RuleSet.cpp |
@@ -204,10 +204,8 @@ bool RuleSet::findBestRuleSetAndAdd(const CSSSelector& component, RuleData& rule |
return true; |
} |
- // TODO(esprehn): We shouldn't favor tagName over m_shadowHostRules, it means |
- // selectors with div:host end up in the tagName list matched against all tags |
- // even though they can't match anything at all. |
if (component.isHostPseudoClass()) { |
+ ASSERT(component.isLastInTagHistory() || (component.relation() == CSSSelector::SubSelector && component.tagHistory()->match() == CSSSelector::PseudoElement)); |
m_shadowHostRules.append(ruleData); |
return true; |
} |