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

Unified Diff: Source/core/dom/Document.cpp

Issue 232013002: Rewind the DocumentLifecycle when dirtying state (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months 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: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 9678701ff802e3b60ea82c77ccce05ee372d2a36..1e65a17adea27a08a44190c8ec47d469c88c4f0b 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1580,7 +1580,7 @@ void Document::scheduleRenderTreeUpdate()
ASSERT(needsRenderTreeUpdate());
page()->animator().scheduleVisualUpdate();
- m_lifecycle.advanceTo(DocumentLifecycle::StyleRecalcPending);
+ m_lifecycle.ensureStateAtMost(DocumentLifecycle::UpdatePending);
InspectorInstrumentation::didScheduleStyleRecalculation(this);
}
@@ -2630,7 +2630,8 @@ bool Document::shouldScheduleLayout() const
//
// (a) Only schedule a layout once the stylesheets are loaded.
// (b) Only schedule layout once we have a body element.
-
+ if (!isActive())
+ return false;
return (isRenderingReady() && body())
|| (documentElement() && !isHTMLHtmlElement(*documentElement()));
esprehn 2014/04/09 21:32:25 Can we split these too so it's easier to read? if
abarth-chromium 2014/04/09 21:41:26 Done.
}

Powered by Google App Engine
This is Rietveld 408576698