Index: Source/WebCore/dom/Document.h |
diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h |
index 87b016015f6919912aa32f6304b5d9d00fdceea1..6042e7c24f5e92e7fd0ba8b71b0ce6398327d006 100644 |
--- a/Source/WebCore/dom/Document.h |
+++ b/Source/WebCore/dom/Document.h |
@@ -235,6 +235,10 @@ class MediaSession; |
class HTMLAttachmentElement; |
#endif |
+#if ENABLE(INTERSECTION_OBSERVER) |
+class IntersectionObserver; |
+#endif |
+ |
namespace Style { |
class Scope; |
}; |
@@ -1340,6 +1344,12 @@ public: |
void addViewportDependentPicture(HTMLPictureElement&); |
void removeViewportDependentPicture(HTMLPictureElement&); |
+#if ENABLE(INTERSECTION_OBSERVER) |
+ void addToIntersectionObserverTargets(Element&); |
+ void removeFromIntersectionObserverTargets(Element&); |
+ void updateIntersectionObservations(); |
+#endif |
+ |
#if ENABLE(MEDIA_STREAM) |
void setHasCaptureMediaStreamTrack() { m_hasHadCaptureMediaStreamTrack = true; } |
bool hasHadCaptureMediaStreamTrack() const { return m_hasHadCaptureMediaStreamTrack; } |
@@ -1549,6 +1559,13 @@ private: |
void checkViewportDependentPictures(); |
+#if ENABLE(INTERSECTION_OBSERVER) |
+ // Return true if any need notifying. |
+ bool updateIntersectionObserveration(IntersectionObserver&, double timeStamp); |
+ void collectIntersectionObservers(HashSet<IntersectionObserver*>&); |
+ void notifyIntersectionObserversTimerFired(); |
+#endif |
+ |
#if USE(QUICK_LOOK) |
bool shouldEnforceQuickLookSandbox() const; |
void applyQuickLookSandbox(); |
@@ -1726,6 +1743,11 @@ private: |
HashSet<HTMLPictureElement*> m_viewportDependentPictures; |
+#if ENABLE(INTERSECTION_OBSERVER) |
+ HashSet<Element*> m_intersectionObserverTargets; |
+ Timer m_intersectionObserversNotifyTimer; |
+#endif |
+ |
Timer m_loadEventDelayTimer; |
ViewportArguments m_viewportArguments; |