| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |