Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(860)

Unified Diff: Source/core/html/parser/HTMLParserScheduler.cpp

Issue 20140002: Remove minimumLayoutDelay() and associated machinery (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: another fix Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/parser/HTMLParserScheduler.cpp
diff --git a/Source/core/html/parser/HTMLParserScheduler.cpp b/Source/core/html/parser/HTMLParserScheduler.cpp
index 1dbd927ff2b20907753ec165cb0c32432e23d201..d99589ade868e06e75455b5668c2cf2f2d8a6b32 100644
--- a/Source/core/html/parser/HTMLParserScheduler.cpp
+++ b/Source/core/html/parser/HTMLParserScheduler.cpp
@@ -90,7 +90,9 @@ void HTMLParserScheduler::continueNextChunkTimerFired(Timer<HTMLParserScheduler>
ASSERT_UNUSED(timer, timer == &m_continueNextChunkTimer);
// FIXME: The timer class should handle timer priorities instead of this code.
// If a layout is scheduled, wait again to let the layout timer run first.
- if (m_parser->document()->isLayoutTimerActive()) {
+ // FIXME: We should fix this by reducing the max-parse-time instead of
+ // artificially forcing the parser to yield agressively before first layout.
+ if (m_parser->document()->parserShouldYieldAgressivelyBeforeFirstLayout()) {
m_continueNextChunkTimer.startOneShot(0);
return;
}
@@ -103,7 +105,7 @@ void HTMLParserScheduler::checkForYieldBeforeScript(PumpSession& session)
// scripts to give the page a chance to paint earlier.
Document* document = m_parser->document();
bool needsFirstPaint = document->view() && !document->view()->hasEverPainted();
- if (needsFirstPaint && document->isLayoutTimerActive())
+ if (needsFirstPaint && document->parserShouldYieldAgressivelyBeforeFirstLayout())
session.needsYield = true;
session.didSeeScript = true;
}

Powered by Google App Engine
This is Rietveld 408576698