Index: third_party/WebKit/Source/core/frame/RemoteFrameView.h |
diff --git a/third_party/WebKit/Source/core/frame/RemoteFrameView.h b/third_party/WebKit/Source/core/frame/RemoteFrameView.h |
index 6f243f464f7c5972a4f090b18bb926f7df80110f..87694ce8a7c357ac076af67f4a65d755e72f7043 100644 |
--- a/third_party/WebKit/Source/core/frame/RemoteFrameView.h |
+++ b/third_party/WebKit/Source/core/frame/RemoteFrameView.h |
@@ -5,6 +5,7 @@ |
#ifndef RemoteFrameView_h |
#define RemoteFrameView_h |
+#include "core/dom/IntersectionObserver.h" |
#include "platform/Widget.h" |
#include "platform/geometry/IntRect.h" |
#include "platform/heap/Handle.h" |
@@ -28,14 +29,10 @@ class RemoteFrameView final : public Widget { |
} |
void dispose() override; |
- |
// Override to notify remote frame that its viewport size has changed. |
void frameRectsChanged() override; |
- |
void invalidateRect(const IntRect&) override; |
- |
void setFrameRect(const IntRect&) override; |
- |
void hide() override; |
void show() override; |
void setParentVisible(bool) override; |
@@ -45,11 +42,22 @@ class RemoteFrameView final : public Widget { |
private: |
explicit RemoteFrameView(RemoteFrame*); |
+ void onViewportIntersectionChanged( |
+ const HeapVector<Member<IntersectionObserverEntry>>&); |
+ void startIntersectionObserver(); |
+ void stopIntersectionObserver(); |
+ |
// The properties and handling of the cycle between RemoteFrame |
// and its RemoteFrameView corresponds to that between LocalFrame |
// and FrameView. Please see the FrameView::m_frame comment for |
// details. |
Member<RemoteFrame> m_remoteFrame; |
+ |
+ // An IntersectionObserver is used to monitor the intersection of this |
+ // frame with the viewport, which is then forwarded to the remote frame |
+ // to enable viewport intersections there to work properly. |
+ Member<IntersectionObserver> m_intersectionObserver; |
+ IntRect m_lastViewportIntersection; |
}; |
DEFINE_TYPE_CASTS(RemoteFrameView, |