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

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

Issue 145663012: Remove the layout timer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updateLayout 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/FrameView.h » ('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 189f09e2622f96b38ed90d0ce34e5ecc5b927c68..ece8a2ac9a896f8e2eb1aa89f1f38b4d198fd404 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -485,6 +485,7 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
, m_hasFullscreenElementStack(false)
, m_loadEventDelayCount(0)
, m_loadEventDelayTimer(this, &Document::loadEventDelayTimerFired)
+ , m_pluginLoadingTimer(this, &Document::pluginLoadingTimerFired)
, m_didSetReferrerPolicy(false)
, m_referrerPolicy(ReferrerPolicyDefault)
, m_directionSetOnDocumentElement(false)
@@ -4917,6 +4918,18 @@ void Document::loadEventDelayTimerFired(Timer<Document>*)
frame()->loader().checkCompleted();
}
+void Document::loadPluginsSoon()
+{
+ // FIXME: Remove this timer once we don't need to compute layout to load plugins.
+ if (!m_pluginLoadingTimer.isActive())
+ m_pluginLoadingTimer.startOneShot(0);
+}
+
+void Document::pluginLoadingTimerFired(Timer<Document>*)
+{
+ updateLayout();
+}
+
ScriptedAnimationController& Document::ensureScriptedAnimationController()
{
if (!m_scriptedAnimationController) {
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698