Closed Bug 1725741 Opened 4 months ago Closed 3 months ago

[wpt-sync] Sync PR 30028 - [LayoutNG] NGSimplifiedOOFLayoutAlgorithm iterator before spanner


(Core :: Layout: Columns, task, P4)




93 Branch
Tracking Status
firefox93 --- fixed


(Reporter:, Unassigned)




(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 30028 into mozilla-central (this bug is closed when the sync is complete).

Details from upstream follow.

b'Alison Maher <>' wrote:

[LayoutNG] NGSimplifiedOOFLayoutAlgorithm iterator before spanner

In the case where we lay out an OOF before a column spanner (due
to column balancing), and the OOF starts in a new column, we could
end up hitting a DCHECK in NGSimplifiedOOFLayoutAlgorithm that makes
sure that the next incoming child break token matches the OOF being
added as a child.

This couldn't happen previously when adding a new column because we
would never have a case where a new column added during OOF layout
had any non-OOF incoming child break tokens. This can now happen,
though, in the case of a column spanner.

One potential fix would be to set the break_token_iterator_ to the
end, but we would miss some of the checks that were set up to catch
incorrect break token ordering. Instead, add an
AdvanceBreakTokenIterator() method to NGSimplifiedOOFLayoutAlgorithm
that will iterate over the incoming child break tokens and add them
to the builder, unless they are from an OOF. This way, we can still
make sure that the order of new OOF fragments is correct.

Bug: 1239677
Change-Id: I5d3ff109d52f9ef91016b5fa71f6a978af7f6c66
WPT-Export-Revision: c00f2dfc59aa263c2858e1bf42601a55ada6bbdc

PR 30028 applied with additional changes from upstream: 1bce3fabaaf18dda576d83f64f3ef03bdd647e3b
Component: web-platform-tests → Layout: Columns
Product: Testing → Core
Test result changes from PR not available.
Pushed by
[wpt PR 30028] - [LayoutNG] NGSimplifiedOOFLayoutAlgorithm iterator before spanner, a=testonly
Test result changes from PR not available.
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.