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
This commit is contained in:
Elliott Sprehn 2015-01-12 22:11:01 -08:00
parent c4ecc2236b
commit 43a9629b49
2 changed files with 3 additions and 15 deletions

View File

@ -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<Document>*)
{
if (!isRenderingReady())
if (!haveImportsLoaded())
return;
if (m_parser)
m_parser->resumeAfterWaitingForImports();

View File

@ -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(); }