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

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

Issue 1300043003: Centralize deferred commit conditions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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/web/WebViewImpl.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 26b33075eb8218667929384816530a6a3338dc64..fc70d14a59351ddd55664b363a1ab122e26b7481 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -367,6 +367,7 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
, TreeScope(*this)
, m_hasNodesWithPlaceholderStyle(false)
, m_evaluateMediaQueriesOnStyleRecalc(false)
+ , m_shouldProcessFrameLifecycle(false)
, m_pendingSheetLayout(NoLayoutWithPendingSheets)
, m_frame(initializer.frame())
, m_domWindow(m_frame ? m_frame->localDOMWindow() : 0)
@@ -5086,6 +5087,19 @@ void Document::pluginLoadingTimerFired(Timer<Document>*)
updateLayout();
}
+bool Document::shouldProcessFrameLifecycle()
+{
+ if (m_shouldProcessFrameLifecycle)
+ return true;
+ if (!isRenderingReady())
+ return false;
+ if ((isHTMLDocument() || isXHTMLDocument()) && !body() && parsing())
+ return false;
+ // Once the page starts processing the pipeline we should never stop.
+ m_shouldProcessFrameLifecycle = true;
+ return true;
+}
+
ScriptedAnimationController& Document::ensureScriptedAnimationController()
{
if (!m_scriptedAnimationController) {
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698