Chromium Code Reviews| 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 aa3ccf3f2599d681445a8a682a191d7b98273321..abb0c2cd2e5c0f779882692664a1c00481c8ef37 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutView.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp |
| @@ -28,10 +28,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" |
| @@ -954,4 +956,24 @@ void LayoutView::willBeDestroyed() |
| m_compositor.clear(); |
| } |
| +void LayoutView::registerMediaForPositionChangeNotification(LayoutMedia* media) |
|
esprehn
2015/10/01 07:04:15
reference
liberato (no reviews please)
2015/10/01 22:49:03
done, though the vector must still be LayoutMedia*
|
| +{ |
| + if (!m_mediaForPositionNotification.contains(media)) |
| + m_mediaForPositionNotification.append(media); |
| +} |
| + |
| +void LayoutView::unregisterMediaForPositionChangeNotification(LayoutMedia* media) |
|
esprehn
2015/10/01 07:04:15
reference
liberato (no reviews please)
2015/10/01 22:49:03
ditto.
|
| +{ |
| + size_t at = m_mediaForPositionNotification.find(media); |
| + if (at != kNotFound) |
| + m_mediaForPositionNotification.remove(at); |
| +} |
| + |
| +void LayoutView::sendMediaPositionChangeNotifications() |
| +{ |
| + for (auto& media : m_mediaForPositionNotification) { |
| + media->notifyPositionMayHaveChanged(); |
|
esprehn
2015/10/01 07:04:15
This isn't really the same timing as intersection
liberato (no reviews please)
2015/10/01 22:49:03
One of the objections to a prior iteration of this
|
| + } |
| +} |
| + |
| } // namespace blink |