Commit 7a9727f0 authored by Morten Stenshorne's avatar Morten Stenshorne Committed by Commit Bot

[LayoutNG] Subtract trailing border/padding when interrupted by a spanner.

Block-end border and padding are added as part of layout, but if the box
is too tall to fit, we'll remove it again. FinishFragmentation() already
handles that, but we need to do something similar when column layout is
interrupted by a spanner, since block-end padding and border of the
spanner's ancestors will be placed after the spanner. Without this fix,
we'd also make room for the border/padding before the spanner.

Bug: 829028
Change-Id: I85e9dd812bbe96df16ae6ab729f809797a30f905
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421495Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808949}
parent ee6b487d
......@@ -264,7 +264,8 @@ bool FinishFragmentation(NGBlockNode node,
// more content, but the specified height is 100px, so distribute what we
// haven't already consumed (100px - 20px = 80px) over two columns. We get
// two fragments for #container after the spanner, each 40px tall.
final_block_size = std::min(final_block_size, intrinsic_block_size);
final_block_size = std::min(final_block_size, intrinsic_block_size) -
border_padding.block_end;
builder->SetDidBreakSelf();
} else if (space_left != kIndefiniteSize && desired_block_size > space_left) {
// We're taller than what we have room for. We don't want to use more than
......
......@@ -1044,8 +1044,6 @@ crbug.com/1079031 virtual/layout_ng_block_frag/external/wpt/css/css-multicol/mul
crbug.com/1079031 virtual/layout_ng_block_frag/external/wpt/css/css-multicol/multicol-rule-fraction-003.xht [ Crash Failure ]
crbug.com/1079031 virtual/layout_ng_block_frag/external/wpt/css/css-multicol/multicol-span-all-009.html [ Crash Failure ]
crbug.com/1079031 virtual/layout_ng_block_frag/external/wpt/css/css-multicol/multicol-span-all-010.html [ Failure ]
crbug.com/829028 virtual/layout_ng_block_frag/external/wpt/css/css-multicol/multicol-span-all-children-height-006.html [ Failure ]
crbug.com/829028 virtual/layout_ng_block_frag/external/wpt/css/css-multicol/multicol-span-all-children-height-008.html [ Failure ]
crbug.com/874051 virtual/layout_ng_block_frag/external/wpt/css/css-multicol/multicol-span-all-fieldset-002.html [ Failure Crash ]
crbug.com/874051 virtual/layout_ng_block_frag/external/wpt/css/css-multicol/multicol-span-all-fieldset-003.html [ Crash Failure ]
crbug.com/829028 virtual/layout_ng_block_frag/external/wpt/css/css-multicol/multicol-span-all-list-item-001.html [ Failure ]
......
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