| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index 9678701ff802e3b60ea82c77ccce05ee372d2a36..1b8b85dbf1bea5fa2308c50dafab58199473d13c 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::VisualUpdatePending);
|
|
|
| InspectorInstrumentation::didScheduleStyleRecalculation(this);
|
| }
|
| @@ -2630,9 +2630,16 @@ 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;
|
| +
|
| + if (isRenderingReady() && body())
|
| + return true;
|
|
|
| - return (isRenderingReady() && body())
|
| - || (documentElement() && !isHTMLHtmlElement(*documentElement()));
|
| + if (documentElement() && !isHTMLHtmlElement(*documentElement()))
|
| + return true;
|
| +
|
| + return false;
|
| }
|
|
|
| int Document::elapsedTime() const
|
|
|