From 43a9629b496c422f528d666197b51ffdbd47e13d Mon Sep 17 00:00:00 2001 From: Elliott Sprehn Date: Mon, 12 Jan 2015 22:11:01 -0800 Subject: [PATCH] Remove isRenderingReady. All this method did was check if imports were loaded, and sky's parser will wait on imports anyway, so there's no reason to block rendering on imports as they'll likely be at the top of the document and stop the rest of the page from being appended or rendered. Sky apps will probably also want more control over rendering and not want the old school web style of incremental rendering. R=abarth@chromium.org, ojan@chromium.org Review URL: https://codereview.chromium.org/835273006 --- engine/core/dom/Document.cpp | 15 ++------------- engine/core/dom/Document.h | 3 +-- 2 files changed, 3 insertions(+), 15 deletions(-) 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(); }