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

Unified Diff: Source/core/dom/Document.cpp

Issue 156943004: Remove minimum layout delay (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/frame/Frame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index b4e3993c274ca1c784bec08c5c1de641e2402c42..a56a6f7aaac11f46d0eb5706b8077b9e41587789 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2432,7 +2432,6 @@ void Document::implicitClose()
// Just bail out. Before or during the onload we were shifted to another page.
// The old i-Bench suite does this. When this happens don't bother painting or laying out.
m_loadEventProgress = LoadEventCompleted;
- view()->unscheduleRelayout();
return;
}
@@ -2585,19 +2584,7 @@ bool Document::shouldScheduleLayout()
bool Document::shouldParserYieldAgressivelyBeforeScriptExecution()
{
- return view() && view()->layoutPending() && !minimumLayoutDelay();
-}
-
-int Document::minimumLayoutDelay()
-{
- if (m_overMinimumLayoutThreshold)
- return 0;
-
- int elapsed = elapsedTime();
- m_overMinimumLayoutThreshold = elapsed > cLayoutScheduleThreshold;
-
- // We'll want to schedule the timer to fire at the minimum layout threshold.
- return max(0, cLayoutScheduleThreshold - elapsed);
+ return view() && view()->layoutPending();
}
int Document::elapsedTime() const
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/frame/Frame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698