Index: Source/core/css/resolver/ScopedStyleResolver.cpp |
diff --git a/Source/core/css/resolver/ScopedStyleResolver.cpp b/Source/core/css/resolver/ScopedStyleResolver.cpp |
index 17f372002fec5f9f718103d072506539ed496103..e3ccf263ce89cf6f8297b15c27800358541f6a8d 100644 |
--- a/Source/core/css/resolver/ScopedStyleResolver.cpp |
+++ b/Source/core/css/resolver/ScopedStyleResolver.cpp |
@@ -128,6 +128,18 @@ void ScopedStyleResolver::collectMatchingAuthorRules(ElementRuleCollector& colle |
collector.setScopeContainsLastMatchedElement(false); |
} |
+void ScopedStyleResolver::collectMatchingShadowHostRules(ElementRuleCollector& collector, bool includeEmptyRules, CascadeScope cascadeScope, CascadeOrder cascadeOrder) |
+{ |
+ RuleRange ruleRange = collector.matchedResult().ranges.authorRuleRange(); |
+ ASSERT(!collector.scopeContainsLastMatchedElement()); |
+ collector.setScopeContainsLastMatchedElement(true); |
+ for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) { |
+ MatchRequest matchRequest(&m_authorStyleSheets[i]->contents()->ruleSet(), includeEmptyRules, &m_scope->rootNode(), m_authorStyleSheets[i], i); |
+ collector.collectMatchingShadowHostRules(matchRequest, ruleRange, cascadeScope, cascadeOrder); |
+ } |
+ collector.setScopeContainsLastMatchedElement(false); |
+} |
+ |
void ScopedStyleResolver::matchPageRules(PageRuleCollector& collector) |
{ |
// Only consider the global author RuleSet for @page rules, as per the HTML5 spec. |