| 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 bc3ab68c3224a822d95c125fd48b2e22d2e619da..8dfaf9b20dfcc91e38f442b836d7af75357170b9 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| @@ -458,16 +458,25 @@ bool LayoutView::mapToVisualRectInAncestorSpace(
|
| rect.move(offsetForFixedPosition(true));
|
|
|
| // Apply our transform if we have one (because of full page zooming).
|
| - if (!ancestor && layer() && layer()->transform())
|
| + if (layer() && layer()->transform())
|
| rect = layer()->transform()->mapRect(rect);
|
|
|
| - ASSERT(ancestor);
|
| if (ancestor == this)
|
| return true;
|
|
|
| Element* owner = document().localOwner();
|
| - if (!owner)
|
| + if (!owner) {
|
| + // This is the case of a Frame with a remote parent.
|
| + if (!document().frame()->isMainFrame()) {
|
| + DCHECK(!ancestor);
|
| + LayoutRect viewportIntersectionRect(
|
| + frameView()->remoteViewportIntersection());
|
| + rect.intersect(viewportIntersectionRect);
|
| + if (rect.isEmpty())
|
| + return false;
|
| + }
|
| return true;
|
| + }
|
|
|
| if (LayoutBox* obj = owner->layoutBox()) {
|
| if (!(mode & InputIsInFrameCoordinates)) {
|
|
|