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

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

Issue 1580783003: Revert of Use Document, rather than document element, for implicit root. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer
Patch Set: Created 4 years, 11 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
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "core/dom/ExecutionContextTask.h" 76 #include "core/dom/ExecutionContextTask.h"
77 #include "core/dom/FrameRequestCallback.h" 77 #include "core/dom/FrameRequestCallback.h"
78 #include "core/dom/IntersectionObserverController.h" 78 #include "core/dom/IntersectionObserverController.h"
79 #include "core/dom/LayoutTreeBuilderTraversal.h" 79 #include "core/dom/LayoutTreeBuilderTraversal.h"
80 #include "core/dom/MainThreadTaskRunner.h" 80 #include "core/dom/MainThreadTaskRunner.h"
81 #include "core/dom/Microtask.h" 81 #include "core/dom/Microtask.h"
82 #include "core/dom/MutationObserver.h" 82 #include "core/dom/MutationObserver.h"
83 #include "core/dom/NodeChildRemovalTracker.h" 83 #include "core/dom/NodeChildRemovalTracker.h"
84 #include "core/dom/NodeComputedStyle.h" 84 #include "core/dom/NodeComputedStyle.h"
85 #include "core/dom/NodeFilter.h" 85 #include "core/dom/NodeFilter.h"
86 #include "core/dom/NodeIntersectionObserverData.h"
87 #include "core/dom/NodeIterator.h" 86 #include "core/dom/NodeIterator.h"
88 #include "core/dom/NodeRareData.h" 87 #include "core/dom/NodeRareData.h"
89 #include "core/dom/NodeTraversal.h" 88 #include "core/dom/NodeTraversal.h"
90 #include "core/dom/NodeWithIndex.h" 89 #include "core/dom/NodeWithIndex.h"
91 #include "core/dom/NthIndexCache.h" 90 #include "core/dom/NthIndexCache.h"
92 #include "core/dom/ProcessingInstruction.h" 91 #include "core/dom/ProcessingInstruction.h"
93 #include "core/dom/ScriptRunner.h" 92 #include "core/dom/ScriptRunner.h"
94 #include "core/dom/ScriptedAnimationController.h" 93 #include "core/dom/ScriptedAnimationController.h"
95 #include "core/dom/ScriptedIdleTaskController.h" 94 #include "core/dom/ScriptedIdleTaskController.h"
96 #include "core/dom/SelectorQuery.h" 95 #include "core/dom/SelectorQuery.h"
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 // FIXME: consider using ActiveDOMObject. 602 // FIXME: consider using ActiveDOMObject.
604 if (m_scriptedAnimationController) 603 if (m_scriptedAnimationController)
605 m_scriptedAnimationController->clearDocumentPointer(); 604 m_scriptedAnimationController->clearDocumentPointer();
606 m_scriptedAnimationController.clear(); 605 m_scriptedAnimationController.clear();
607 606
608 m_scriptedIdleTaskController.clear(); 607 m_scriptedIdleTaskController.clear();
609 608
610 if (svgExtensions()) 609 if (svgExtensions())
611 accessSVGExtensions().pauseAnimations(); 610 accessSVGExtensions().pauseAnimations();
612 611
613 if (m_intersectionObserverData)
614 m_intersectionObserverData->dispose();
615
616 m_lifecycle.advanceTo(DocumentLifecycle::Disposed); 612 m_lifecycle.advanceTo(DocumentLifecycle::Disposed);
617 DocumentLifecycleNotifier::notifyDocumentWasDisposed(); 613 DocumentLifecycleNotifier::notifyDocumentWasDisposed();
618 614
619 m_canvasFontCache.clear(); 615 m_canvasFontCache.clear();
620 } 616 }
621 #endif 617 #endif
622 618
623 SelectorQueryCache& Document::selectorQueryCache() 619 SelectorQueryCache& Document::selectorQueryCache()
624 { 620 {
625 if (!m_selectorQueryCache) 621 if (!m_selectorQueryCache)
(...skipping 4452 matching lines...) Expand 10 before | Expand all | Expand 10 after
5078 return m_intersectionObserverController; 5074 return m_intersectionObserverController;
5079 } 5075 }
5080 5076
5081 IntersectionObserverController& Document::ensureIntersectionObserverController() 5077 IntersectionObserverController& Document::ensureIntersectionObserverController()
5082 { 5078 {
5083 if (!m_intersectionObserverController) 5079 if (!m_intersectionObserverController)
5084 m_intersectionObserverController = IntersectionObserverController::creat e(this); 5080 m_intersectionObserverController = IntersectionObserverController::creat e(this);
5085 return *m_intersectionObserverController; 5081 return *m_intersectionObserverController;
5086 } 5082 }
5087 5083
5088 NodeIntersectionObserverData& Document::ensureIntersectionObserverData()
5089 {
5090 if (!m_intersectionObserverData)
5091 m_intersectionObserverData = new NodeIntersectionObserverData();
5092 return *m_intersectionObserverData;
5093 }
5094
5095 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe xt) 5084 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe xt)
5096 { 5085 {
5097 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); 5086 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText);
5098 } 5087 }
5099 5088
5100 void Document::addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage> consoleM essage) 5089 void Document::addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage> consoleM essage)
5101 { 5090 {
5102 if (!isContextThread()) { 5091 if (!isContextThread()) {
5103 m_taskRunner->postTask(BLINK_FROM_HERE, AddConsoleMessageTask::create(co nsoleMessage->source(), consoleMessage->level(), consoleMessage->message())); 5092 m_taskRunner->postTask(BLINK_FROM_HERE, AddConsoleMessageTask::create(co nsoleMessage->source(), consoleMessage->level(), consoleMessage->message()));
5104 return; 5093 return;
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
5912 #ifndef NDEBUG 5901 #ifndef NDEBUG
5913 using namespace blink; 5902 using namespace blink;
5914 void showLiveDocumentInstances() 5903 void showLiveDocumentInstances()
5915 { 5904 {
5916 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 5905 Document::WeakDocumentSet& set = Document::liveDocumentSet();
5917 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5906 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5918 for (Document* document : set) 5907 for (Document* document : set)
5919 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5908 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5920 } 5909 }
5921 #endif 5910 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698