Index: Source/core/layout/LayoutView.cpp |
diff --git a/Source/core/layout/LayoutView.cpp b/Source/core/layout/LayoutView.cpp |
index 6d382e74a7b20b63b47724a53c4b8287df0b300c..27caf97a450bafb08ee0e4ef2ed2380efea99cef 100644 |
--- a/Source/core/layout/LayoutView.cpp |
+++ b/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" |
@@ -1012,4 +1014,27 @@ 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() |
+{ |
+ for (LayoutMedia** media = m_mediaForPositionNotification.begin(); |
ojan
2015/09/01 20:20:11
C++11 auto to make this for loop more readable. Se
liberato (no reviews please)
2015/09/04 06:49:46
Done.
|
+ media != m_mediaForPositionNotification.end(); media++) { |
+ if (!(*media)) |
+ continue; |
+ (*media)->notifyPositionMayHaveChanged(); |
+ } |
+} |
+ |
} // namespace blink |