Index: Source/core/css/resolver/ScopedStyleResolver.cpp |
diff --git a/Source/core/css/resolver/ScopedStyleResolver.cpp b/Source/core/css/resolver/ScopedStyleResolver.cpp |
index 72417408eb4f8990bd40edceca5e33a0ca0f3fa7..23150ca2aa99660be1cc8d54daa60e40b3fb6d7b 100644 |
--- a/Source/core/css/resolver/ScopedStyleResolver.cpp |
+++ b/Source/core/css/resolver/ScopedStyleResolver.cpp |
@@ -160,36 +160,44 @@ void ScopedStyleResolver::addKeyframeStyle(PassRefPtrWillBeRawPtr<StyleRuleKeyfr |
} |
} |
-void ScopedStyleResolver::collectMatchingAuthorRules(ElementRuleCollector& collector, bool includeEmptyRules, CascadeOrder cascadeOrder) |
+void ScopedStyleResolver::collectMatchingAuthorRules(ElementRuleCollector& collector, bool includeEmptyRules) |
{ |
ASSERT(!collector.scopeContainsLastMatchedElement()); |
collector.setScopeContainsLastMatchedElement(true); |
for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) { |
ASSERT(m_authorStyleSheets[i]->ownerNode()); |
MatchRequest matchRequest(&m_authorStyleSheets[i]->contents()->ruleSet(), includeEmptyRules, &m_scope->rootNode(), m_authorStyleSheets[i], i); |
- collector.collectMatchingRules(matchRequest, cascadeOrder); |
+ collector.collectMatchingRules(matchRequest); |
} |
collector.setScopeContainsLastMatchedElement(false); |
} |
-void ScopedStyleResolver::collectMatchingShadowHostRules(ElementRuleCollector& collector, bool includeEmptyRules, CascadeOrder cascadeOrder) |
+void ScopedStyleResolver::collectMatchingShadowHostRules(ElementRuleCollector& collector, bool includeEmptyRules) |
{ |
ASSERT(!collector.scopeContainsLastMatchedElement()); |
collector.setScopeContainsLastMatchedElement(true); |
for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) { |
ASSERT(m_authorStyleSheets[i]->ownerNode()); |
MatchRequest matchRequest(&m_authorStyleSheets[i]->contents()->ruleSet(), includeEmptyRules, &m_scope->rootNode(), m_authorStyleSheets[i], i); |
- collector.collectMatchingShadowHostRules(matchRequest, cascadeOrder); |
+ collector.collectMatchingShadowHostRules(matchRequest); |
} |
collector.setScopeContainsLastMatchedElement(false); |
} |
-void ScopedStyleResolver::collectMatchingTreeBoundaryCrossingRules(ElementRuleCollector& collector, bool includeEmptyRules, CascadeOrder cascadeOrder) |
+void ScopedStyleResolver::collectMatchingTreeBoundaryCrossingRules(ElementRuleCollector& collector, bool includeEmptyRules) |
{ |
+ if (!m_treeBoundaryCrossingRuleSet) |
+ return; |
+ |
+ ASSERT(!collector.scopeContainsLastMatchedElement()); |
+ collector.setScopeContainsLastMatchedElement(true); |
+ |
for (const auto& rules : *m_treeBoundaryCrossingRuleSet) { |
MatchRequest request(rules->m_ruleSet.get(), includeEmptyRules, &treeScope().rootNode(), rules->m_parentStyleSheet, rules->m_parentIndex); |
- collector.collectMatchingRules(request, cascadeOrder, true); |
+ collector.collectMatchingRules(request, true); |
} |
+ |
+ collector.setScopeContainsLastMatchedElement(false); |
} |
void ScopedStyleResolver::matchPageRules(PageRuleCollector& collector) |