Index: Source/core/layout/LayoutView.h |
diff --git a/Source/core/layout/LayoutView.h b/Source/core/layout/LayoutView.h |
index ea2d26fb1293418ec90d06deeb704c0e50177288..a7f029a82a58f880fd02ffb3cd84efa2b3a10112 100644 |
--- a/Source/core/layout/LayoutView.h |
+++ b/Source/core/layout/LayoutView.h |
@@ -42,6 +42,7 @@ namespace blink { |
class DeprecatedPaintLayerCompositor; |
class LayoutQuote; |
+class LayoutMedia; |
// The root of the layout tree, corresponding to the CSS initial containing block. |
// It's dimensions match that of the logical viewport (which may be different from |
@@ -189,6 +190,15 @@ public: |
// It is very likely you do not want to call this method. |
void setShouldDoFullPaintInvalidationForViewAndAllDescendants(); |
+ // Some LayoutMedias want to know about their viewport visibility for |
+ // crbug.com/487345,402044 . This facility will be removed once those |
+ // experiments complete. |
+ void registerMediaForPositionChangeNotification(LayoutMedia*); |
+ void unregisterMediaForPositionChangeNotification(LayoutMedia*); |
+ // Notify all registered LayoutMedias that their position on-screen might |
+ // have changed. |
+ void sendMediaPositionChangeNotifications(); |
+ |
private: |
void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const override; |
@@ -234,6 +244,8 @@ private: |
OwnPtrWillBePersistent<HitTestCache> m_hitTestCache; |
OwnPtrWillBePersistent<PendingSelection> m_pendingSelection; |
+ |
+ Vector<LayoutMedia*> m_mediaForPositionNotification; |
}; |
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); |