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

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

Issue 1770523002: Track connected subframes per-Document instead of per-Node. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix various crashes but still doesn't refcount tracked nodes (and needs to) Created 4 years, 9 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, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 24 matching lines...) Expand all
35 #include "core/animation/CompositorPendingAnimations.h" 35 #include "core/animation/CompositorPendingAnimations.h"
36 #include "core/dom/ContainerNode.h" 36 #include "core/dom/ContainerNode.h"
37 #include "core/dom/DocumentEncodingData.h" 37 #include "core/dom/DocumentEncodingData.h"
38 #include "core/dom/DocumentInit.h" 38 #include "core/dom/DocumentInit.h"
39 #include "core/dom/DocumentLifecycle.h" 39 #include "core/dom/DocumentLifecycle.h"
40 #include "core/dom/DocumentLifecycleNotifier.h" 40 #include "core/dom/DocumentLifecycleNotifier.h"
41 #include "core/dom/DocumentLifecycleObserver.h" 41 #include "core/dom/DocumentLifecycleObserver.h"
42 #include "core/dom/DocumentTiming.h" 42 #include "core/dom/DocumentTiming.h"
43 #include "core/dom/ExecutionContext.h" 43 #include "core/dom/ExecutionContext.h"
44 #include "core/dom/MutationObserver.h" 44 #include "core/dom/MutationObserver.h"
45 #include "core/dom/SubframeTracker.h"
45 #include "core/dom/TextLinkColors.h" 46 #include "core/dom/TextLinkColors.h"
46 #include "core/dom/TreeScope.h" 47 #include "core/dom/TreeScope.h"
47 #include "core/dom/UserActionElementSet.h" 48 #include "core/dom/UserActionElementSet.h"
48 #include "core/dom/ViewportDescription.h" 49 #include "core/dom/ViewportDescription.h"
49 #include "core/dom/custom/CustomElement.h" 50 #include "core/dom/custom/CustomElement.h"
50 #include "core/fetch/ClientHintsPreferences.h" 51 #include "core/fetch/ClientHintsPreferences.h"
51 #include "core/frame/DOMTimerCoordinator.h" 52 #include "core/frame/DOMTimerCoordinator.h"
52 #include "core/frame/LocalDOMWindow.h" 53 #include "core/frame/LocalDOMWindow.h"
53 #include "core/frame/OriginsUsingFeatures.h" 54 #include "core/frame/OriginsUsingFeatures.h"
54 #include "core/html/CollectionType.h" 55 #include "core/html/CollectionType.h"
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 static bool threadedParsingEnabledForTesting(); 1048 static bool threadedParsingEnabledForTesting();
1048 1049
1049 void incrementNodeCount() { m_nodeCount++; } 1050 void incrementNodeCount() { m_nodeCount++; }
1050 void decrementNodeCount() 1051 void decrementNodeCount()
1051 { 1052 {
1052 ASSERT(m_nodeCount > 0); 1053 ASSERT(m_nodeCount > 0);
1053 m_nodeCount--; 1054 m_nodeCount--;
1054 } 1055 }
1055 int nodeCount() const { return m_nodeCount; } 1056 int nodeCount() const { return m_nodeCount; }
1056 1057
1058 SubframeTracker& subframeTracker() { return m_subframeTracker; }
1059
1057 using WeakDocumentSet = WillBeHeapHashSet<RawPtrWillBeWeakMember<Document>>; 1060 using WeakDocumentSet = WillBeHeapHashSet<RawPtrWillBeWeakMember<Document>>;
1058 static WeakDocumentSet& liveDocumentSet(); 1061 static WeakDocumentSet& liveDocumentSet();
1059 1062
1060 WebTaskRunner* loadingTaskRunner() const; 1063 WebTaskRunner* loadingTaskRunner() const;
1061 WebTaskRunner* timerTaskRunner() const; 1064 WebTaskRunner* timerTaskRunner() const;
1062 1065
1063 void enforceStrictMixedContentChecking(); 1066 void enforceStrictMixedContentChecking();
1064 1067
1065 protected: 1068 protected:
1066 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); 1069 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 1229
1227 uint64_t m_domTreeVersion; 1230 uint64_t m_domTreeVersion;
1228 static uint64_t s_globalTreeVersion; 1231 static uint64_t s_globalTreeVersion;
1229 1232
1230 uint64_t m_styleVersion; 1233 uint64_t m_styleVersion;
1231 1234
1232 WillBeHeapHashSet<RawPtrWillBeWeakMember<NodeIterator>> m_nodeIterators; 1235 WillBeHeapHashSet<RawPtrWillBeWeakMember<NodeIterator>> m_nodeIterators;
1233 using AttachedRangeSet = WillBeHeapHashSet<RawPtrWillBeWeakMember<Range>>; 1236 using AttachedRangeSet = WillBeHeapHashSet<RawPtrWillBeWeakMember<Range>>;
1234 AttachedRangeSet m_ranges; 1237 AttachedRangeSet m_ranges;
1235 1238
1239 SubframeTracker m_subframeTracker;
1240
1236 unsigned short m_listenerTypes; 1241 unsigned short m_listenerTypes;
1237 1242
1238 MutationObserverOptions m_mutationObserverTypes; 1243 MutationObserverOptions m_mutationObserverTypes;
1239 1244
1240 OwnPtrWillBeMember<StyleEngine> m_styleEngine; 1245 OwnPtrWillBeMember<StyleEngine> m_styleEngine;
1241 RefPtrWillBeMember<StyleSheetList> m_styleSheetList; 1246 RefPtrWillBeMember<StyleSheetList> m_styleSheetList;
1242 1247
1243 OwnPtrWillBeMember<FormController> m_formController; 1248 OwnPtrWillBeMember<FormController> m_formController;
1244 1249
1245 TextLinkColors m_textLinkColors; 1250 TextLinkColors m_textLinkColors;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1451 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1447 1452
1448 } // namespace blink 1453 } // namespace blink
1449 1454
1450 #ifndef NDEBUG 1455 #ifndef NDEBUG
1451 // Outside the WebCore namespace for ease of invocation from gdb. 1456 // Outside the WebCore namespace for ease of invocation from gdb.
1452 CORE_EXPORT void showLiveDocumentInstances(); 1457 CORE_EXPORT void showLiveDocumentInstances();
1453 #endif 1458 #endif
1454 1459
1455 #endif // Document_h 1460 #endif // Document_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContainerNode.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698