Apply fixed-position scroll offset if the containing block is ancestor.
An earlier patch (commit e931d2ae) changed code in MapToVisualRectInAncestorSpace to omit fixed-position scroll in cases where the containing block was the LayoutView and a counter-scroll would have been applied in the LayoutView anyway. This fixed a bug in which a clip was applied in-between in the wrong space. The CL introduced a bug, however, in the case when the LayoutView was the desired ancestor passed to MapToVisualRectInAncestorSpace. In this case we should apply the counter scroll in LayoutView, because the results of MapToVisualRectInAncestorSpace are in the unscrolled space of the LayoutView. Note that LayoutBox::MapToVisualRectInAncestorSpace already has code to skip fixed-position scroll and clip if container == ancestor, independent of the above commit. Bug:841194 Change-Id: Ia05894dd94bdb3b0503cbb155728b0ef074b0227 Reviewed-on: https://chromium-review.googlesource.com/1058039Reviewed-by:Philip Rogers <pdr@chromium.org> Commit-Queue: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#558473}
Showing
Please register or sign in to comment