diff --git a/engine/core/dom/Document.cpp b/engine/core/dom/Document.cpp index c718870f10d..4784cffa892 100644 --- a/engine/core/dom/Document.cpp +++ b/engine/core/dom/Document.cpp @@ -1443,18 +1443,7 @@ void Document::setParsing(bool b) bool Document::shouldScheduleLayout() const { - // This function will only be called when FrameView thinks a layout is needed. - // This enforces a couple extra rules. - // - // (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()) - return true; - - return false; + return isActive(); } int Document::elapsedTime() const @@ -1526,7 +1515,7 @@ void Document::didLoadAllParserBlockingResources() void Document::resumeParserWaitingForResourcesTimerFired(Timer*) { - if (!isRenderingReady()) + if (!haveImportsLoaded()) return; if (m_parser) m_parser->resumeAfterWaitingForImports(); diff --git a/engine/core/dom/Document.h b/engine/core/dom/Document.h index 804dc69a76d..08b884417cd 100644 --- a/engine/core/dom/Document.h +++ b/engine/core/dom/Document.h @@ -229,8 +229,7 @@ public: StyleResolver* styleResolver() const; StyleResolver& ensureStyleResolver() const; - bool isRenderingReady() const { return haveImportsLoaded(); } - bool isScriptExecutionReady() const { return isRenderingReady(); } + bool isScriptExecutionReady() const { return haveImportsLoaded(); } StyleEngine* styleEngine() { return m_styleEngine.get(); }