| Index: third_party/WebKit/Source/core/frame/FrameView.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| index 2deec3bb175e6b96f626dcea17993d05e0034530..8e5a9be6d0cfbd939881e1cbf14a6d8c67e4bc10 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -1092,6 +1092,28 @@ void FrameView::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalidation
|
|
|
| m_doFullPaintInvalidation = false;
|
| lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean);
|
| +
|
| + // Temporary callback for crbug.com/487345,402044
|
| + // TODO(ojan): Make this more general to be used by PositionObserver
|
| + // and rAF throttling.
|
| + IntRect visibleRect = rootFrameToContents(computeVisibleArea());
|
| + rootForPaintInvalidation.sendMediaPositionChangeNotifications(visibleRect);
|
| +}
|
| +
|
| +IntRect FrameView::computeVisibleArea()
|
| +{
|
| + // Return our clipping bounds in the root frame.
|
| + IntRect us(frameRect());
|
| + if (FrameView* parent = parentFrameView()) {
|
| + us = parent->contentsToRootFrame(us);
|
| + IntRect parentRect = parent->computeVisibleArea();
|
| + if (parentRect.isEmpty())
|
| + return IntRect();
|
| +
|
| + us.intersect(parentRect);
|
| + }
|
| +
|
| + return us;
|
| }
|
|
|
| DocumentLifecycle& FrameView::lifecycle() const
|
|
|