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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 1324263002: Merge 201232 "Revert of Centralize deferred commit conditions. (..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2490/
Patch Set: Created 5 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 element->focus(); 361 element->focus();
362 } 362 }
363 } 363 }
364 }; 364 };
365 365
366 Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC lasses) 366 Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC lasses)
367 : ContainerNode(0, CreateDocument) 367 : ContainerNode(0, CreateDocument)
368 , TreeScope(*this) 368 , TreeScope(*this)
369 , m_hasNodesWithPlaceholderStyle(false) 369 , m_hasNodesWithPlaceholderStyle(false)
370 , m_evaluateMediaQueriesOnStyleRecalc(false) 370 , m_evaluateMediaQueriesOnStyleRecalc(false)
371 , m_shouldProcessFrameLifecycle(false)
372 , m_pendingSheetLayout(NoLayoutWithPendingSheets) 371 , m_pendingSheetLayout(NoLayoutWithPendingSheets)
373 , m_frame(initializer.frame()) 372 , m_frame(initializer.frame())
374 , m_domWindow(m_frame ? m_frame->localDOMWindow() : 0) 373 , m_domWindow(m_frame ? m_frame->localDOMWindow() : 0)
375 , m_importsController(initializer.importsController()) 374 , m_importsController(initializer.importsController())
376 , m_activeParserCount(0) 375 , m_activeParserCount(0)
377 , m_contextFeatures(ContextFeatures::defaultSwitch()) 376 , m_contextFeatures(ContextFeatures::defaultSwitch())
378 , m_wellFormed(false) 377 , m_wellFormed(false)
379 , m_printing(false) 378 , m_printing(false)
380 , m_paginatedForScreen(false) 379 , m_paginatedForScreen(false)
381 , m_compatibilityMode(NoQuirksMode) 380 , m_compatibilityMode(NoQuirksMode)
(...skipping 4703 matching lines...) Expand 10 before | Expand all | Expand 10 after
5085 // FIXME: Remove this timer once we don't need to compute layout to load plu gins. 5084 // FIXME: Remove this timer once we don't need to compute layout to load plu gins.
5086 if (!m_pluginLoadingTimer.isActive()) 5085 if (!m_pluginLoadingTimer.isActive())
5087 m_pluginLoadingTimer.startOneShot(0, FROM_HERE); 5086 m_pluginLoadingTimer.startOneShot(0, FROM_HERE);
5088 } 5087 }
5089 5088
5090 void Document::pluginLoadingTimerFired(Timer<Document>*) 5089 void Document::pluginLoadingTimerFired(Timer<Document>*)
5091 { 5090 {
5092 updateLayout(); 5091 updateLayout();
5093 } 5092 }
5094 5093
5095 bool Document::shouldProcessFrameLifecycle()
5096 {
5097 if (m_shouldProcessFrameLifecycle)
5098 return true;
5099 if (!isRenderingReady())
5100 return false;
5101 if ((isHTMLDocument() || isXHTMLDocument()) && !body() && parsing())
5102 return false;
5103 // Once the page starts processing the pipeline we should never stop.
5104 m_shouldProcessFrameLifecycle = true;
5105 return true;
5106 }
5107
5108 ScriptedAnimationController& Document::ensureScriptedAnimationController() 5094 ScriptedAnimationController& Document::ensureScriptedAnimationController()
5109 { 5095 {
5110 if (!m_scriptedAnimationController) { 5096 if (!m_scriptedAnimationController) {
5111 m_scriptedAnimationController = ScriptedAnimationController::create(this ); 5097 m_scriptedAnimationController = ScriptedAnimationController::create(this );
5112 // We need to make sure that we don't start up the animation controller on a background tab, for example. 5098 // We need to make sure that we don't start up the animation controller on a background tab, for example.
5113 if (!page()) 5099 if (!page())
5114 m_scriptedAnimationController->suspend(); 5100 m_scriptedAnimationController->suspend();
5115 } 5101 }
5116 return *m_scriptedAnimationController; 5102 return *m_scriptedAnimationController;
5117 } 5103 }
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
5719 #ifndef NDEBUG 5705 #ifndef NDEBUG
5720 using namespace blink; 5706 using namespace blink;
5721 void showLiveDocumentInstances() 5707 void showLiveDocumentInstances()
5722 { 5708 {
5723 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 5709 Document::WeakDocumentSet& set = Document::liveDocumentSet();
5724 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5710 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5725 for (Document* document : set) 5711 for (Document* document : set)
5726 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5712 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5727 } 5713 }
5728 #endif 5714 #endif
OLDNEW
« 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