| 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 0e6eef99d8899f32d30875e03c38a8ead324a4bf..6f276191da4afa35135f138f9dbd983ac45b62bf 100644
|
| --- a/third_party/WebKit/Source/core/css/RuleSet.cpp
|
| +++ b/third_party/WebKit/Source/core/css/RuleSet.cpp
|
| @@ -257,12 +257,13 @@ void RuleSet::addChildRules(const HeapVector<Member<StyleRuleBase>>& rules, cons
|
| StyleRule* styleRule = toStyleRule(rule);
|
|
|
| const CSSSelectorList& selectorList = styleRule->selectorList();
|
| - for (size_t selectorIndex = 0; selectorIndex != kNotFound; selectorIndex = selectorList.indexOfNextSelectorAfter(selectorIndex)) {
|
| - if (selectorList.selectorAt(selectorIndex).hasDeepCombinatorOrShadowPseudo()) {
|
| + for (const CSSSelector* selector = selectorList.first(); selector; selector = selectorList.next(*selector)) {
|
| + size_t selectorIndex = selectorList.selectorIndex(*selector);
|
| + if (selector->hasDeepCombinatorOrShadowPseudo()) {
|
| m_deepCombinatorOrShadowPseudoRules.append(MinimalRuleData(styleRule, selectorIndex, addRuleFlags));
|
| - } else if (selectorList.selectorAt(selectorIndex).hasContentPseudo()) {
|
| + } else if (selector->hasContentPseudo()) {
|
| m_contentPseudoElementRules.append(MinimalRuleData(styleRule, selectorIndex, addRuleFlags));
|
| - } else if (selectorList.selectorAt(selectorIndex).hasSlottedPseudo()) {
|
| + } else if (selector->hasSlottedPseudo()) {
|
| m_slottedPseudoElementRules.append(MinimalRuleData(styleRule, selectorIndex, addRuleFlags));
|
| } else {
|
| addRule(styleRule, selectorIndex, addRuleFlags);
|
|
|