Chromium Code Reviews| 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) { |