Commit a0be1c38 authored by wkorman's avatar wkorman Committed by Commit bot

Clean up in-flow position offset for LayoutInline mapping to visual rect.

Review-Url: https://codereview.chromium.org/2165913005
Cr-Commit-Position: refs/heads/master@{#406911}
parent 612550fd
......@@ -1078,20 +1078,14 @@ bool LayoutInline::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* an
if (!container)
return true;
LayoutPoint topLeft = rect.location();
if (style()->hasInFlowPosition() && layer()) {
// Apply the in-flow position offset when invalidating a rectangle. The layer
// is translated, but the layout box isn't, so we need to do this to get the
// right dirty rect. Since this is called from LayoutObject::setStyle, the relative position
// flag on the LayoutObject has been cleared, so use the one on the style().
topLeft += layer()->offsetForInFlowPosition();
rect.move(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);
LayoutBox* containerBox = container->isBox() ? toLayoutBox(container) : nullptr;
if (containerBox && !containerBox->mapScrollingContentsRectToBoxSpace(rect, container == ancestor ? ApplyNonScrollOverflowClip : ApplyOverflowClip, visualRectFlags))
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment