summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/chromium/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp b/chromium/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp
index c74628479df..61cb172ccae 100644
--- a/chromium/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp
@@ -88,34 +88,14 @@ HTMLParserScheduler::~HTMLParserScheduler()
void HTMLParserScheduler::continueNextChunkTimerFired(Timer<HTMLParserScheduler>* timer)
{
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.
- // 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()->shouldParserYieldAgressivelyBeforeScriptExecution()) {
- m_continueNextChunkTimer.startOneShot(0);
- return;
- }
m_parser->resumeParsingAfterYield();
}
-void HTMLParserScheduler::checkForYieldBeforeScript(PumpSession& session)
-{
- // If we've never painted before and a layout is pending, yield prior to running
- // 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->shouldParserYieldAgressivelyBeforeScriptExecution())
- session.needsYield = true;
- session.didSeeScript = true;
-}
-
void HTMLParserScheduler::scheduleForResume()
{
- m_continueNextChunkTimer.startOneShot(0);
+ m_continueNextChunkTimer.startOneShot(0, FROM_HERE);
}
-
void HTMLParserScheduler::suspend()
{
ASSERT(!m_isSuspendedWithActiveTimer);
@@ -131,7 +111,7 @@ void HTMLParserScheduler::resume()
if (!m_isSuspendedWithActiveTimer)
return;
m_isSuspendedWithActiveTimer = false;
- m_continueNextChunkTimer.startOneShot(0);
+ m_continueNextChunkTimer.startOneShot(0, FROM_HERE);
}
}