[wpt-sync] Sync PR 40724 - Use the block-in-inline layout result when considering breaks.
Categories
(Core :: Layout, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox117 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 40724 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/40724
Details from upstream follow.
Morten Stenshorne <mstensho@chromium.org> wrote:
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: Iaca8269d46eeaa7dc222298d77873a9c051f71c3Reviewed-on: https://chromium-review.googlesource.com/4638061
WPT-Export-Revision: e9838eab9a18cf1f56ccca924e8ce00a5a38e2d8
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
CI Results
Ran 8 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 2 tests
Status Summary
Firefox
PASS
: 2
Chrome
TIMEOUT
: 2
Safari
PASS
: 2
Links
Comment 4•2 years ago
|
||
bugherder |
Description
•