[LayoutNG] Spanner break token and fragmentation improvements. #24539
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We were creating incorrect outgoing break tokens from column content
that was interrupted by two or more adjacent spanners. The outgoing
break token would point to the second spanner, rather than any column
content that would follow. To fix this, make sure that we don't
interrupt column layout until we have looked past all adjacent spanners,
to find the right place to resume column layout right away.
This gets especially more fun if we're nested inside another
fragmentation context, because then we may not be able to resume column
content layout in the same outer fragmentation. Therefore we need to
keep proper track of all the spanner break tokens.
Introduce a walker to streamline processing of the multicol parts
(spanners and/or column content), and thus make LayoutChildren() easier
to follow. We're now also better at handling parallel flows established
inside spanners.
Bug: 1066617, 829028
Change-Id: I7ad3f8f19f7258e2f8a588034c0002249efdaf20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2288705
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786940}