| Index: third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| index 3056632e4b2a3752155b6093ba48bd3bbcd180bc..5313853971f78c318f8c62e23ac8dded92e9d190 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| @@ -29,10 +29,12 @@
|
| #include "core/frame/Settings.h"
|
| #include "core/html/HTMLFrameOwnerElement.h"
|
| #include "core/html/HTMLIFrameElement.h"
|
| +#include "core/html/HTMLVideoElement.h"
|
| #include "core/inspector/InspectorTraceEvents.h"
|
| #include "core/layout/HitTestResult.h"
|
| #include "core/layout/LayoutFlowThread.h"
|
| #include "core/layout/LayoutGeometryMap.h"
|
| +#include "core/layout/LayoutMedia.h"
|
| #include "core/layout/LayoutPart.h"
|
| #include "core/layout/LayoutQuote.h"
|
| #include "core/layout/LayoutScrollbarPart.h"
|
| @@ -947,4 +949,24 @@ void LayoutView::willBeDestroyed()
|
| m_compositor.clear();
|
| }
|
|
|
| +void LayoutView::registerMediaForPositionChangeNotification(LayoutMedia& media)
|
| +{
|
| + if (!m_mediaForPositionNotification.contains(&media))
|
| + m_mediaForPositionNotification.append(&media);
|
| +}
|
| +
|
| +void LayoutView::unregisterMediaForPositionChangeNotification(LayoutMedia& media)
|
| +{
|
| + size_t at = m_mediaForPositionNotification.find(&media);
|
| + if (at != kNotFound)
|
| + m_mediaForPositionNotification.remove(at);
|
| +}
|
| +
|
| +void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect)
|
| +{
|
| + for (auto& media : m_mediaForPositionNotification) {
|
| + media->notifyPositionMayHaveChanged(visibleRect);
|
| + }
|
| +}
|
| +
|
| } // namespace blink
|
|
|