Index: Source/core/dom/Document.h |
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h |
index 8512bdd52e7dff453044d5204a900f7dbe332ad8..e2ca009b604041c552ee59b72177c85ecebe19dc 100644 |
--- a/Source/core/dom/Document.h |
+++ b/Source/core/dom/Document.h |
@@ -124,6 +124,7 @@ class HTMLScriptElement; |
class HitTestRequest; |
class IdleRequestCallback; |
class InputDeviceCapabilities; |
+class IntersectionObserver; |
class LayoutPoint; |
class LiveNodeListBase; |
class Locale; |
@@ -172,6 +173,8 @@ struct IconURL; |
using MouseEventWithHitTestResults = EventWithHitTestResults<PlatformMouseEvent>; |
using ExceptionCode = int; |
+using IntersectionObservers = WillBeHeapListHashSet<RefPtrWillBeMember<IntersectionObserver>>; |
+ |
enum StyleResolverUpdateMode { |
// Discards the StyleResolver and rebuilds it. |
FullStyleUpdate, |
@@ -677,6 +680,9 @@ public: |
bool hasMutationObservers() const { return m_mutationObserverTypes; } |
void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObserverTypes |= types; } |
+ void activateIntersectionObserver(IntersectionObserver&); |
+ void resumeSuspendedIntersectionObservers(); |
+ |
void updateViewportDescription(); |
void processReferrerPolicy(const String& policy); |
@@ -1060,6 +1066,8 @@ protected: |
void lockCompatibilityMode() { m_compatibilityModeLocked = true; } |
ParserSynchronizationPolicy parserSynchronizationPolicy() const { return m_parserSyncPolicy; } |
+ void deliverIntersectionObservationsTimerFired(Timer<Document>*); |
+ |
private: |
friend class IgnoreDestructiveWriteCountIncrementer; |
friend class NthIndexCache; |
@@ -1325,6 +1333,10 @@ private: |
Timer<Document> m_loadEventDelayTimer; |
Timer<Document> m_pluginLoadingTimer; |
+ Timer<Document> m_deliverIntersectionObservationsTimer; |
+ IntersectionObservers m_activeIntersectionObservers; |
+ IntersectionObservers m_suspendedIntersectionObservers; |
+ |
ViewportDescription m_viewportDescription; |
ViewportDescription m_legacyViewportDescription; |
Length m_viewportDefaultMinWidth; |