Index: Source/core/css/resolver/ViewportStyleResolver.cpp |
diff --git a/Source/core/css/resolver/ViewportStyleResolver.cpp b/Source/core/css/resolver/ViewportStyleResolver.cpp |
index f38f7d78060e3820d8a3cfbfe6a31d572e1e7795..3d701961422c264a127efda12a6bb062d97bbd17 100644 |
--- a/Source/core/css/resolver/ViewportStyleResolver.cpp |
+++ b/Source/core/css/resolver/ViewportStyleResolver.cpp |
@@ -50,7 +50,16 @@ ViewportStyleResolver::~ViewportStyleResolver() |
{ |
} |
-void ViewportStyleResolver::addViewportRule(StyleRuleViewport* viewportRule) |
+void ViewportStyleResolver::collectViewportRules(RuleSet* rules, Origin origin) |
+{ |
+ rules->compactRulesIfNeeded(); |
+ |
+ const Vector<StyleRuleViewport*>& viewportRules = rules->viewportRules(); |
+ for (size_t i = 0; i < viewportRules.size(); ++i) |
+ addViewportRule(viewportRules[i], origin); |
+} |
+ |
+void ViewportStyleResolver::addViewportRule(StyleRuleViewport* viewportRule, Origin origin) |
{ |
StylePropertySet* propertySet = viewportRule->mutableProperties(); |
@@ -58,6 +67,9 @@ void ViewportStyleResolver::addViewportRule(StyleRuleViewport* viewportRule) |
if (!propertyCount) |
return; |
+ if (origin == AuthorOrigin) |
+ m_hasAuthorStyle = true; |
+ |
if (!m_propertySet) { |
m_propertySet = propertySet->mutableCopy(); |
return; |