Closed Bug 1725741 Opened 4 months ago Closed 3 months ago

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

Categories

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

task

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

PR: https://github.com/web-platform-tests/wpt/pull/30028
Details from upstream follow.

b'Alison Maher <almaher@microsoft.com>' 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
Reviewed-on: https://chromium-review.googlesource.com/3094701
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 wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/52cebc8f11e8
[wpt PR 30028] - [LayoutNG] NGSimplifiedOOFLayoutAlgorithm iterator before spanner, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
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.