| 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 663371ae1e0e3f8130f6b1480ed4385491360480..ba97888f66c243b5f65b8d06c2b6ae4575890812 100644
|
| --- a/third_party/WebKit/Source/core/css/RuleSet.cpp
|
| +++ b/third_party/WebKit/Source/core/css/RuleSet.cpp
|
| @@ -78,12 +78,8 @@ 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) {
|
| + if (current->relationIsAffectedByPseudoContent() || current->pseudoType() == CSSSelector::PseudoSlotted)
|
| return false;
|
| - }
|
| if (current->relation() != CSSSelector::SubSelector) {
|
| current = current->tagHistory();
|
| break;
|
| @@ -222,7 +218,8 @@ bool RuleSet::findBestRuleSetAndAdd(const CSSSelector& component, RuleData& rule
|
| void RuleSet::addRule(StyleRule* rule, unsigned selectorIndex, AddRuleFlags addRuleFlags)
|
| {
|
| RuleData ruleData(rule, selectorIndex, m_ruleCount++, addRuleFlags);
|
| - m_features.collectFeaturesFromRuleData(ruleData);
|
| + if (m_features.collectFeaturesFromRuleData(ruleData) == RuleFeatureSet::SelectorNeverMatches)
|
| + return;
|
|
|
| if (!findBestRuleSetAndAdd(ruleData.selector(), ruleData)) {
|
| // If we didn't find a specialized map to stick it in, file under universal rules.
|
|
|