Chromium Code Reviews| 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.
|
| } |