| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| index a13a9e4024071cf51eb6d4d514f4c365624035ab..34a2342d179dee4d501ea2df0e052a57a5b5310f 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -1983,30 +1983,25 @@ bool LayoutBox::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* ances
|
| topLeft += layer()->offsetForInFlowPosition();
|
| }
|
|
|
| - // FIXME: We ignore the lightweight clipping rect that controls use, since if |o| is in mid-layout,
|
| - // its controlClipRect will be wrong. For overflow clip we use the values cached by the layer.
|
| rect.setLocation(topLeft);
|
| if (container->hasOverflowClip()) {
|
| LayoutBox* containerBox = toLayoutBox(container);
|
| - containerBox->mapScrollingContentsRectToBoxSpace(rect);
|
| + if (!container->isLayoutView() || position != FixedPosition)
|
| + containerBox->mapScrollingContentsRectToBoxSpace(rect);
|
| if (container != ancestor && !containerBox->applyOverflowClip(rect, visualRectFlags))
|
| return false;
|
| + } else if (container->isLayoutView()) {
|
| + if (!toLayoutView(container)->mapContentRectToFrameSpace(this, rect, visualRectFlags))
|
| + return false;
|
| }
|
|
|
| if (ancestorSkipped) {
|
| - // If the ancestor is below o, then we need to map the rect into paintInvalidationContainer's coordinates.
|
| - LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(container);
|
| - rect.move(-containerOffset);
|
| - // If the ancestor is fixed, then the rect is already in its coordinates so doesn't need viewport-adjusting.
|
| - if (ancestor->style()->position() != FixedPosition && container->isLayoutView() && position == FixedPosition)
|
| - toLayoutView(container)->adjustOffsetForFixedPosition(rect);
|
| + // If the ancestor is below container, then we need to map the rect into ancestor's coordinates.
|
| + rect.move(-ancestor->offsetFromAncestorContainer(container));
|
| return true;
|
| }
|
|
|
| - if (container->isLayoutView())
|
| - return toLayoutView(container)->mapToVisualRectInAncestorSpace(ancestor, rect, position == FixedPosition ? IsFixed : 0, visualRectFlags);
|
| - else
|
| - return container->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectFlags);
|
| + return container->mapToVisualRectInAncestorSpace(ancestor, rect, visualRectFlags);
|
| }
|
|
|
| void LayoutBox::inflatePaintInvalidationRectForReflectionAndFilter(LayoutRect& paintInvalidationRect) const
|
|
|