Index: Source/core/css/resolver/ScopedStyleResolver.cpp |
diff --git a/Source/core/css/resolver/ScopedStyleResolver.cpp b/Source/core/css/resolver/ScopedStyleResolver.cpp |
index 95d6b8050bb077f6be9360a429cf4fbbb7fe4eba..bb87f1f9517301f9dd250b60dd3182cd31ceb458 100644 |
--- a/Source/core/css/resolver/ScopedStyleResolver.cpp |
+++ b/Source/core/css/resolver/ScopedStyleResolver.cpp |
@@ -247,14 +247,24 @@ const ContainerNode* ScopedStyleResolver::scopingNodeFor(const CSSStyleSheet* sh |
return (parent->isElementNode() || parent->isShadowRoot()) ? parent : 0; |
} |
-void ScopedStyleResolver::addRulesFromSheet(StyleSheetContents* sheet, const MediaQueryEvaluator& medium, StyleResolver* resolver) |
+inline RuleSet* ScopedStyleResolver::ensureAuthorStyle() |
{ |
if (!m_authorStyle) |
m_authorStyle = RuleSet::create(); |
- m_authorStyle->addRulesFromSheet(sheet, medium, resolver, &m_scopingNode); |
+ return m_authorStyle.get(); |
+} |
+ |
+void ScopedStyleResolver::addRulesFromSheet(StyleSheetContents* sheet, const MediaQueryEvaluator& medium, StyleResolver* resolver, bool viewportRuleIsProcessed) |
+{ |
+ ensureAuthorStyle()->addRulesFromSheet(sheet, medium, resolver, &m_scopingNode, viewportRuleIsProcessed); |
resolver->processScopedRules(*m_authorStyle, sheet->baseURL(), &m_scopingNode); |
} |
+void ScopedStyleResolver::addViewportRule(StyleRuleViewport* rule) |
+{ |
+ ensureAuthorStyle()->addViewportRule(rule); |
+} |
+ |
inline RuleSet* ScopedStyleResolver::ensureAtHostRuleSetFor(const ShadowRoot* shadowRoot) |
{ |
HashMap<const ShadowRoot*, OwnPtr<RuleSet> >::AddResult addResult = m_atHostRules.add(shadowRoot, nullptr); |