Commit 1125e910 authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

[LayoutNG] Fix disable_flip logic in PaintInvalidator::MapLocalRectToVisualRectInBacking

The disable_flip added in CL:960403 mistakenly disables inclusion
of LocalClipPathBoundingBox. This patch fixes the logic only to
disable block flipping.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I6617ddf1d852cd9d98dcaa86d6926d01a5e7af8c
Reviewed-on: https://chromium-review.googlesource.com/1013805Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551265}
parent 1a19c914
...@@ -72,18 +72,21 @@ LayoutRect PaintInvalidator::MapLocalRectToVisualRectInBacking( ...@@ -72,18 +72,21 @@ LayoutRect PaintInvalidator::MapLocalRectToVisualRectInBacking(
// coordinates. // coordinates.
Rect rect = local_rect; Rect rect = local_rect;
// Writing-mode flipping doesn't apply to non-root SVG. // Writing-mode flipping doesn't apply to non-root SVG.
if (!is_svg_child && !disable_flip) { if (!is_svg_child) {
if (object.IsBox()) { if (!disable_flip) {
ToLayoutBox(object).FlipForWritingMode(rect); if (object.IsBox()) {
} else if (!(context.subtree_flags & ToLayoutBox(object).FlipForWritingMode(rect);
PaintInvalidatorContext::kSubtreeSlowPathRect)) { } else if (!(context.subtree_flags &
// For SPv2 and the GeometryMapper path, we also need to convert the rect PaintInvalidatorContext::kSubtreeSlowPathRect)) {
// for non-boxes into physical coordinates before applying paint offset. // For SPv2 and the GeometryMapper path, we also need to convert the
// (Otherwise we'll call mapToVisualrectInAncestorSpace() which requires // rect for non-boxes into physical coordinates before applying paint
// physical coordinates for boxes, but "physical coordinates with flipped // offset. (Otherwise we'll call mapToVisualrectInAncestorSpace() which
// block-flow direction" for non-boxes for which we don't need to flip.) // requires physical coordinates for boxes, but "physical coordinates
// TODO(wangxianzhu): Avoid containingBlock(). // with flipped block-flow direction" for non-boxes for which we don't
object.ContainingBlock()->FlipForWritingMode(rect); // need to flip.)
// TODO(wangxianzhu): Avoid containingBlock().
object.ContainingBlock()->FlipForWritingMode(rect);
}
} }
// Unite visual rect with clip path bounding rect. // Unite visual rect with clip path bounding rect.
......
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