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

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

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