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

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

Issue 145663012: Remove the layout timer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add workaround for plugins 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 548b832de1fea673afa385fd7ceb5ce9d7ee5663..823792f6343bfe9da905b18a7dcf9499293fec3b 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)
@@ -4918,6 +4919,23 @@ 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>*)
+{
+ if (!frame())
+ return;
+ if (FrameView* view = frame()->view()) {
+ if (view->needsLayout())
+ view->layout();
+ }
+}
abarth-chromium 2014/02/04 23:26:38 Ojan, would you be willing to review this addition
+
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