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, 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 class HTMLElement; | 117 class HTMLElement; |
118 class HTMLFrameOwnerElement; | 118 class HTMLFrameOwnerElement; |
119 class HTMLHeadElement; | 119 class HTMLHeadElement; |
120 class HTMLImportLoader; | 120 class HTMLImportLoader; |
121 class HTMLImportsController; | 121 class HTMLImportsController; |
122 class HTMLLinkElement; | 122 class HTMLLinkElement; |
123 class HTMLScriptElement; | 123 class HTMLScriptElement; |
124 class HitTestRequest; | 124 class HitTestRequest; |
125 class IdleRequestCallback; | 125 class IdleRequestCallback; |
126 class InputDeviceCapabilities; | 126 class InputDeviceCapabilities; |
| 127 class IntersectionObserver; |
127 class LayoutPoint; | 128 class LayoutPoint; |
128 class LiveNodeListBase; | 129 class LiveNodeListBase; |
129 class Locale; | 130 class Locale; |
130 class LocalFrame; | 131 class LocalFrame; |
131 class Location; | 132 class Location; |
132 class MainThreadTaskRunner; | 133 class MainThreadTaskRunner; |
133 class MediaQueryListListener; | 134 class MediaQueryListListener; |
134 class MediaQueryMatcher; | 135 class MediaQueryMatcher; |
135 class NodeFilter; | 136 class NodeFilter; |
136 class NodeIterator; | 137 class NodeIterator; |
(...skipping 28 matching lines...) Expand all Loading... |
165 class TreeWalker; | 166 class TreeWalker; |
166 class VisitedLinkState; | 167 class VisitedLinkState; |
167 class WebGLRenderingContext; | 168 class WebGLRenderingContext; |
168 | 169 |
169 struct AnnotatedRegionValue; | 170 struct AnnotatedRegionValue; |
170 struct IconURL; | 171 struct IconURL; |
171 | 172 |
172 using MouseEventWithHitTestResults = EventWithHitTestResults<PlatformMouseEvent>
; | 173 using MouseEventWithHitTestResults = EventWithHitTestResults<PlatformMouseEvent>
; |
173 using ExceptionCode = int; | 174 using ExceptionCode = int; |
174 | 175 |
| 176 using IntersectionObservers = WillBeHeapListHashSet<RefPtrWillBeMember<Intersect
ionObserver>>; |
| 177 |
175 enum StyleResolverUpdateMode { | 178 enum StyleResolverUpdateMode { |
176 // Discards the StyleResolver and rebuilds it. | 179 // Discards the StyleResolver and rebuilds it. |
177 FullStyleUpdate, | 180 FullStyleUpdate, |
178 // Attempts to use StyleInvalidationAnalysis to avoid discarding the entire
StyleResolver. | 181 // Attempts to use StyleInvalidationAnalysis to avoid discarding the entire
StyleResolver. |
179 AnalyzedStyleUpdate | 182 AnalyzedStyleUpdate |
180 }; | 183 }; |
181 | 184 |
182 enum NodeListInvalidationType { | 185 enum NodeListInvalidationType { |
183 DoNotInvalidateOnAttributeChanges = 0, | 186 DoNotInvalidateOnAttributeChanges = 0, |
184 InvalidateOnClassAttrChange, | 187 InvalidateOnClassAttrChange, |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 bool hasListenerType(ListenerType listenerType) const { return (m_listenerTy
pes & listenerType); } | 673 bool hasListenerType(ListenerType listenerType) const { return (m_listenerTy
pes & listenerType); } |
671 void addListenerTypeIfNeeded(const AtomicString& eventType); | 674 void addListenerTypeIfNeeded(const AtomicString& eventType); |
672 | 675 |
673 bool hasMutationObserversOfType(MutationObserver::MutationType type) const | 676 bool hasMutationObserversOfType(MutationObserver::MutationType type) const |
674 { | 677 { |
675 return m_mutationObserverTypes & type; | 678 return m_mutationObserverTypes & type; |
676 } | 679 } |
677 bool hasMutationObservers() const { return m_mutationObserverTypes; } | 680 bool hasMutationObservers() const { return m_mutationObserverTypes; } |
678 void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObs
erverTypes |= types; } | 681 void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObs
erverTypes |= types; } |
679 | 682 |
| 683 void activateIntersectionObserver(IntersectionObserver&); |
| 684 void resumeSuspendedIntersectionObservers(); |
| 685 |
680 void updateViewportDescription(); | 686 void updateViewportDescription(); |
681 void processReferrerPolicy(const String& policy); | 687 void processReferrerPolicy(const String& policy); |
682 | 688 |
683 // Returns the owning element in the parent document. | 689 // Returns the owning element in the parent document. |
684 // Returns nullptr if this is the top level document. | 690 // Returns nullptr if this is the top level document. |
685 HTMLFrameOwnerElement* ownerElement() const; | 691 HTMLFrameOwnerElement* ownerElement() const; |
686 | 692 |
687 // Returns true if this document belongs to a frame that the parent document | 693 // Returns true if this document belongs to a frame that the parent document |
688 // made invisible (for instance by setting as style display:none). | 694 // made invisible (for instance by setting as style display:none). |
689 bool isInInvisibleSubframe() const; | 695 bool isInInvisibleSubframe() const; |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 #if !ENABLE(OILPAN) | 1059 #if !ENABLE(OILPAN) |
1054 void dispose() override; | 1060 void dispose() override; |
1055 #endif | 1061 #endif |
1056 | 1062 |
1057 virtual PassRefPtrWillBeRawPtr<Document> cloneDocumentWithoutChildren(); | 1063 virtual PassRefPtrWillBeRawPtr<Document> cloneDocumentWithoutChildren(); |
1058 | 1064 |
1059 bool importContainerNodeChildren(ContainerNode* oldContainerNode, PassRefPtr
WillBeRawPtr<ContainerNode> newContainerNode, ExceptionState&); | 1065 bool importContainerNodeChildren(ContainerNode* oldContainerNode, PassRefPtr
WillBeRawPtr<ContainerNode> newContainerNode, ExceptionState&); |
1060 void lockCompatibilityMode() { m_compatibilityModeLocked = true; } | 1066 void lockCompatibilityMode() { m_compatibilityModeLocked = true; } |
1061 ParserSynchronizationPolicy parserSynchronizationPolicy() const { return m_p
arserSyncPolicy; } | 1067 ParserSynchronizationPolicy parserSynchronizationPolicy() const { return m_p
arserSyncPolicy; } |
1062 | 1068 |
| 1069 void deliverIntersectionObservationsTimerFired(Timer<Document>*); |
| 1070 |
1063 private: | 1071 private: |
1064 friend class IgnoreDestructiveWriteCountIncrementer; | 1072 friend class IgnoreDestructiveWriteCountIncrementer; |
1065 friend class NthIndexCache; | 1073 friend class NthIndexCache; |
1066 | 1074 |
1067 bool isDocumentFragment() const = delete; // This will catch anyone doing an
unnecessary check. | 1075 bool isDocumentFragment() const = delete; // This will catch anyone doing an
unnecessary check. |
1068 bool isDocumentNode() const = delete; // This will catch anyone doing an unn
ecessary check. | 1076 bool isDocumentNode() const = delete; // This will catch anyone doing an unn
ecessary check. |
1069 bool isElementNode() const = delete; // This will catch anyone doing an unne
cessary check. | 1077 bool isElementNode() const = delete; // This will catch anyone doing an unne
cessary check. |
1070 | 1078 |
1071 ScriptedAnimationController& ensureScriptedAnimationController(); | 1079 ScriptedAnimationController& ensureScriptedAnimationController(); |
1072 ScriptedIdleTaskController& ensureScriptedIdleTaskController(); | 1080 ScriptedIdleTaskController& ensureScriptedIdleTaskController(); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 WeakPtrWillBeWeakMember<Document> m_contextDocument; | 1326 WeakPtrWillBeWeakMember<Document> m_contextDocument; |
1319 | 1327 |
1320 bool m_hasFullscreenSupplement; // For early return in Fullscreen::fromIfExi
sts() | 1328 bool m_hasFullscreenSupplement; // For early return in Fullscreen::fromIfExi
sts() |
1321 | 1329 |
1322 WillBeHeapVector<RefPtrWillBeMember<Element>> m_topLayerElements; | 1330 WillBeHeapVector<RefPtrWillBeMember<Element>> m_topLayerElements; |
1323 | 1331 |
1324 int m_loadEventDelayCount; | 1332 int m_loadEventDelayCount; |
1325 Timer<Document> m_loadEventDelayTimer; | 1333 Timer<Document> m_loadEventDelayTimer; |
1326 Timer<Document> m_pluginLoadingTimer; | 1334 Timer<Document> m_pluginLoadingTimer; |
1327 | 1335 |
| 1336 Timer<Document> m_deliverIntersectionObservationsTimer; |
| 1337 IntersectionObservers m_activeIntersectionObservers; |
| 1338 IntersectionObservers m_suspendedIntersectionObservers; |
| 1339 |
1328 ViewportDescription m_viewportDescription; | 1340 ViewportDescription m_viewportDescription; |
1329 ViewportDescription m_legacyViewportDescription; | 1341 ViewportDescription m_legacyViewportDescription; |
1330 Length m_viewportDefaultMinWidth; | 1342 Length m_viewportDefaultMinWidth; |
1331 | 1343 |
1332 ReferrerPolicy m_referrerPolicy; | 1344 ReferrerPolicy m_referrerPolicy; |
1333 | 1345 |
1334 DocumentTiming m_documentTiming; | 1346 DocumentTiming m_documentTiming; |
1335 RefPtrWillBeMember<MediaQueryMatcher> m_mediaQueryMatcher; | 1347 RefPtrWillBeMember<MediaQueryMatcher> m_mediaQueryMatcher; |
1336 bool m_writeRecursionIsTooDeep; | 1348 bool m_writeRecursionIsTooDeep; |
1337 unsigned m_writeRecursionDepth; | 1349 unsigned m_writeRecursionDepth; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); | 1440 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); |
1429 | 1441 |
1430 } // namespace blink | 1442 } // namespace blink |
1431 | 1443 |
1432 #ifndef NDEBUG | 1444 #ifndef NDEBUG |
1433 // Outside the WebCore namespace for ease of invocation from gdb. | 1445 // Outside the WebCore namespace for ease of invocation from gdb. |
1434 CORE_EXPORT void showLiveDocumentInstances(); | 1446 CORE_EXPORT void showLiveDocumentInstances(); |
1435 #endif | 1447 #endif |
1436 | 1448 |
1437 #endif // Document_h | 1449 #endif // Document_h |
OLD | NEW |