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

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

Issue 1582993002: Use Document, rather than document element, for implicit root. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 7b68c8dd8cf13d314a80354bda77fd244b747848..b8a19d24048bd6bdadfc6b73542aa5f2eb4224dd 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -83,6 +83,7 @@
#include "core/dom/NodeChildRemovalTracker.h"
#include "core/dom/NodeComputedStyle.h"
#include "core/dom/NodeFilter.h"
+#include "core/dom/NodeIntersectionObserverData.h"
#include "core/dom/NodeIterator.h"
#include "core/dom/NodeRareData.h"
#include "core/dom/NodeTraversal.h"
@@ -609,6 +610,9 @@ void Document::dispose()
if (svgExtensions())
accessSVGExtensions().pauseAnimations();
+ if (m_intersectionObserverData)
+ m_intersectionObserverData->dispose();
+
m_lifecycle.advanceTo(DocumentLifecycle::Disposed);
DocumentLifecycleNotifier::notifyDocumentWasDisposed();
@@ -5081,6 +5085,13 @@ IntersectionObserverController& Document::ensureIntersectionObserverController()
return *m_intersectionObserverController;
}
+NodeIntersectionObserverData& Document::ensureIntersectionObserverData()
+{
+ if (!m_intersectionObserverData)
+ m_intersectionObserverData = new NodeIntersectionObserverData();
+ return *m_intersectionObserverData;
+}
+
void Document::reportBlockedScriptExecutionToInspector(const String& directiveText)
{
InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText);
@@ -5885,6 +5896,7 @@ DEFINE_TRACE(Document)
visitor->trace(m_contextDocument);
visitor->trace(m_canvasFontCache);
visitor->trace(m_intersectionObserverController);
+ visitor->trace(m_intersectionObserverData);
WillBeHeapSupplementable<Document>::trace(visitor);
#endif
TreeScope::trace(visitor);
« 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