fune/testing/web-platform/tests/css/css-break/table-cell-padding-block-in-inline-crash.html
Morten Stenshorne 1226bad70e Bug 1840105 [wpt PR 40724] - Use the block-in-inline layout result when considering breaks., a=testonly
Automatic update from web-platform-tests
Use the block-in-inline layout result when considering breaks.

The layout result for the line box that's wrapped around the block-
in-inline isn't very useful when it comes to considering break points.
In order to get access to any block break token inside, for instance,
we need the layout result and fragment of the anonymous block, not the
line box. We were making an incorrect decision to break before an
element in MovePastBreakpoint() because of this bug. Since we failed
to realize that the child had actually broken inside (since we didn't
see the break tokens that were actually there), we'd instead check if
the child was taller than the remaining space - which it was. So we
ended up breaking before at a last-resort break point, instead of
using the breakpoint that we had already found inside. This is a rather
bizarre situation, and in this case it's caused by underlying bugs.
But at least we will no longer freeze / crash, with this CL.

We should also be able to remove code added by CL:4181113 from
NGInlineLayoutAlgorithm::PlaceBlockInInline() (setting the
break appeal there manually should no longer be necessary), now that we
use the "right" layout result for fragmentation considerations. But
since this CL is likely to be merged to older versions, let's keep it
as safe and merge-friendly as possible.

NGBoxFragmentBuilder::AddResult() should also call the new function
LayoutResultForPropagation() instead of doing the work on its own, but
for the same reason as above, leave it alone for now.

Bug: 1453643
Change-Id: Iaca8269d46eeaa7dc222298d77873a9c051f71c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4638061
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1162074}

--

wpt-commits: 41453f17f71dc87ae64693a9daa87eb2cd0033d4
wpt-pr: 40724
2023-07-06 08:21:05 +00:00

22 lines
769 B
HTML

<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1453643">
<div style="columns:3; column-fill:auto; height:400px;">
<div style="display:table;">
<span>
<table style="border-spacing:0; margin-top:16px; line-height:18px;">
<tr>
<td style="padding:0;">
<div style="height:300px;">
Should not freeze or crash.
</div>
</td>
</tr>
<tr>
<td style="padding-top:0; padding-bottom:100px;"><br><br><br><br><br></td>
<td style="padding-top:0; padding-bottom:100px;"><br><br><br></td>
</tr>
</table>
</span>
</div>
</div>