Bug 1811513 [wpt PR 38081] - Clamp break appeal from blocks in inlines., a=testonly
commit687f6794d4bf86d8776b9ac1029dc14440ad398e
authorMorten Stenshorne <mstensho@chromium.org>
Fri, 27 Jan 2023 14:13:13 +0000 (27 14:13 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Wed, 1 Feb 2023 13:59:30 +0000 (1 13:59 +0000)
tree084029439ff57aa7239f2cc5e5798eac9590a080
parent1b526c59280688e96b60d2767b3af9a1c6511d62
Bug 1811513 [wpt PR 38081] - Clamp break appeal from blocks in inlines., a=testonly

Automatic update from web-platform-tests
Clamp break appeal from blocks in inlines.

This makes it possible to break before a block inside an inline.

We used to add and keep a break break inside the anonymous
block-in-inline wrapper, before the actual block inside the inline. This
is a last-resort break (we should break *between* siblings, not between
a parent and its first child), but we didn't clamp the break appeal
accordingly. This made MovePastBreakpoint() actually move past it and
add the fragment. When entering NGBoxFragmentBuilder::
PropagateBreakInfo() after adding this child fragment, we'd then clamp
the appeal of breaking inside the container (that's the anonymous block
around the SPAN in the testcase included) down to last-resort (because
the caller of PropagateBreakInfo() peeks inside the line to find the
layout result of the block fragment inside the line), and end up
breaking before the whole thing. If we instead break before the line
with the block in inline, none of this will happen.

Bug: 1290809
Change-Id: I452be9378c2cdf3ec0beecc56ea8b35d1391aa6a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4181113
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1095564}

--

wpt-commits: 56be9e3738b07309ae574add9702e853e35c2072
wpt-pr: 38081
testing/web-platform/tests/css/css-break/block-in-inline-004.html [new file with mode: 0644]