| Index: third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.cpp
|
| index aab5a680243cabe7a948fd1a2e85e924d784a5d2..c7c788e415c4ae01ae98a8dc4b6f30d000676262 100644
|
| --- a/third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.cpp
|
| +++ b/third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.cpp
|
| @@ -299,21 +299,25 @@ Length ViewportStyleResolver::viewportLengthValue(CSSPropertyID id) {
|
| void ViewportStyleResolver::initialViewportChanged() {
|
| if (m_needsUpdate == CollectRules)
|
| return;
|
| + if (m_hasViewportUnits)
|
| + m_needsUpdate = Resolve;
|
|
|
| auto& results = m_viewportDependentMediaQueryResults;
|
| for (unsigned i = 0; i < results.size(); i++) {
|
| if (m_initialViewportMedium->eval(results[i]->expression()) !=
|
| results[i]->result()) {
|
| m_needsUpdate = CollectRules;
|
| - return;
|
| + break;
|
| }
|
| }
|
| - if (m_hasViewportUnits)
|
| - m_needsUpdate = Resolve;
|
| + if (m_needsUpdate == NoUpdate)
|
| + return;
|
| + m_document->scheduleLayoutTreeUpdateIfNeeded();
|
| }
|
|
|
| void ViewportStyleResolver::setNeedsCollectRules() {
|
| m_needsUpdate = CollectRules;
|
| + m_document->scheduleLayoutTreeUpdateIfNeeded();
|
| }
|
|
|
| void ViewportStyleResolver::updateViewport(
|
|
|