[LayoutNG] Column break token replacement with spanners #33758
Merged
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.
In CL:2692357, we added logic to replace the column break token
in its parent's list of child break tokens (if it had been updated
as a result of OOF fragmentation). However, if there
was a spanner, and the spanner had a break token,
|current_column_index| would stay set to 0, and we would end up
thinking the first column was the last column in the parent's
list of children. We would then replace the second column's
break token with the updated break token of the first column.
To fix this, set current_column_index to kNotFound by default,
and only look at the child break tokens if current_column_index
has been set to something else.
Bug: 1314916
Change-Id: I05b3790f90e3f34d4015c57ac7bfca367778ffa9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3603262
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Alison Maher <almaher@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#995753}