Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.cpp

Issue 2484863003: Make updateStyleAndLayoutTree ready for async stylesheet update. (Closed)
Patch Set: Rebased Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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(
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.h ('k') | third_party/WebKit/Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698