Index: Source/core/css/resolver/StyleResolver.cpp |
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp |
index 2216bae31b28effd064782d13f7ea4033d271d0f..04ab882e1df779cea1a30f05dbcfc36f6dc5717a 100644 |
--- a/Source/core/css/resolver/StyleResolver.cpp |
+++ b/Source/core/css/resolver/StyleResolver.cpp |
@@ -452,17 +452,16 @@ void StyleResolver::matchScopedAuthorRules(ElementRuleCollector& collector, bool |
return; |
} |
- Vector<std::pair<ScopedStyleResolver*, bool>, 8> stack; |
+ Vector<ScopedStyleResolver*, 8> stack; |
m_styleTree.resolveScopeStyles(m_state.element(), stack); |
if (stack.isEmpty()) |
return; |
- for (int i = stack.size() - 1; i >= 0; --i) { |
- ScopedStyleResolver* scopeResolver = stack.at(i).first; |
- bool applyAuthorStyles = stack.at(i).second; |
- scopeResolver->matchAuthorRules(collector, includeEmptyRules, applyAuthorStyles); |
- } |
- matchHostRules(stack.first().first, collector, includeEmptyRules); |
+ bool applyAuthorStyles = m_state.element()->treeScope()->applyAuthorStyles(); |
+ for (int i = stack.size() - 1; i >= 0; --i) |
+ stack.at(i)->matchAuthorRules(collector, includeEmptyRules, applyAuthorStyles); |
+ |
+ matchHostRules(stack.first(), collector, includeEmptyRules); |
} |
void StyleResolver::matchAuthorRules(ElementRuleCollector& collector, bool includeEmptyRules) |