| Index: third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp b/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
|
| index 5255fd0d9ceaba22fd1c1aa5d0d284ea20fdab4d..6062dc2f74756cfa73ccba114dde7f55a23bbc09 100644
|
| --- a/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
|
| @@ -50,21 +50,24 @@ void RemoteFrameView::UpdateRemoteViewportIntersection() {
|
| // even if there are RemoteFrame ancestors in the frame tree.
|
| LayoutRect rect(0, 0, FrameRect().Width(), FrameRect().Height());
|
| rect.Move(remote_frame_->OwnerLayoutObject()->ContentBoxOffset());
|
| - if (!remote_frame_->OwnerLayoutObject()->MapToVisualRectInAncestorSpace(
|
| - nullptr, rect))
|
| - return;
|
| - IntRect root_visible_rect = local_root_view->VisibleContentRect();
|
| - IntRect viewport_intersection(rect);
|
| - viewport_intersection.Intersect(root_visible_rect);
|
| - viewport_intersection.Move(-local_root_view->ScrollOffsetInt());
|
| -
|
| - // Translate the intersection rect from the root frame's coordinate space
|
| - // to the remote frame's coordinate space.
|
| - viewport_intersection = ConvertFromRootFrame(viewport_intersection);
|
| + IntRect viewport_intersection;
|
| + if (remote_frame_->OwnerLayoutObject()->MapToVisualRectInAncestorSpace(
|
| + nullptr, rect)) {
|
| + IntRect root_visible_rect = local_root_view->VisibleContentRect();
|
| + IntRect intersected_rect(rect);
|
| + intersected_rect.Intersect(root_visible_rect);
|
| + intersected_rect.Move(-local_root_view->ScrollOffsetInt());
|
| +
|
| + // Translate the intersection rect from the root frame's coordinate space
|
| + // to the remote frame's coordinate space.
|
| + viewport_intersection = ConvertFromRootFrame(intersected_rect);
|
| + }
|
| +
|
| if (viewport_intersection != last_viewport_intersection_) {
|
| remote_frame_->Client()->UpdateRemoteViewportIntersection(
|
| viewport_intersection);
|
| }
|
| +
|
| last_viewport_intersection_ = viewport_intersection;
|
| }
|
|
|
| @@ -108,8 +111,6 @@ void RemoteFrameView::FrameRectsChanged() {
|
| new_rect = Parent()->ConvertToRootFrame(
|
| ToFrameView(Parent())->ContentsToFrame(new_rect));
|
| remote_frame_->Client()->FrameRectsChanged(new_rect);
|
| -
|
| - UpdateRemoteViewportIntersection();
|
| }
|
|
|
| void RemoteFrameView::Hide() {
|
|
|