Index: Source/core/css/resolver/ScopedStyleResolver.cpp |
diff --git a/Source/core/css/resolver/ScopedStyleResolver.cpp b/Source/core/css/resolver/ScopedStyleResolver.cpp |
index cb60fdc2797d8951a99328e1a12bb8ff11abd8cb..ab6755e20fdc8f70d1457d3b185aeba0c8101e63 100644 |
--- a/Source/core/css/resolver/ScopedStyleResolver.cpp |
+++ b/Source/core/css/resolver/ScopedStyleResolver.cpp |
@@ -34,6 +34,7 @@ |
#include "core/css/RuleSet.h" |
#include "core/css/StyleRule.h" |
#include "core/css/resolver/StyleResolver.h" // For MatchRequest. |
+#include "core/css/resolver/ViewportStyleResolver.h" |
#include "core/dom/Document.h" |
#include "core/dom/shadow/ElementShadow.h" |
#include "core/dom/shadow/ShadowRoot.h" |
@@ -427,8 +428,10 @@ void ScopedStyleResolver::matchPageRules(PageRuleCollector& collector) |
void ScopedStyleResolver::collectViewportRulesTo(StyleResolver* resolver) const |
{ |
+ // Only consider the global author RuleSet for @viewport rules. |
+ ASSERT(m_scopingNode.isDocumentNode()); |
if (m_authorStyle) |
- resolver->collectViewportRules(m_authorStyle.get(), StyleResolver::AuthorOrigin); |
+ resolver->viewportStyleResolver()->collectViewportRules(m_authorStyle.get(), ViewportStyleResolver::AuthorOrigin); |
} |
} // namespace WebCore |