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 269ad5bb07092e2f6d9ab4d97ddcf9000953944d..5fd34974ec2c21ebcb3ba5a9380956fe36b7f11e 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp |
@@ -343,6 +343,8 @@ void LayoutView::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, |
transformState.move(parentDocLayoutItem.contentBoxOffset()); |
parentDocLayoutItem.mapLocalToAncestor(ancestor, transformState, mode); |
+ } else { |
+ frameView()->applyTransformForTopFrameSpace(transformState); |
} |
} |
} |
@@ -463,16 +465,15 @@ 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) |
- return true; |
+ return frameView()->mapToVisualRectInTopFrameSpace(rect); |
if (LayoutBox* obj = owner->layoutBox()) { |
if (!(mode & InputIsInFrameCoordinates)) { |