Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LayoutNG] Column break token replacement with spanners #33758

Merged
merged 1 commit into from Apr 25, 2022

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Apr 22, 2022

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}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants