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

Don't include BR clearance in the line's height. #30876

Merged
merged 1 commit into from Sep 21, 2021

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Sep 20, 2021

Including clearance in the line height may result in tall monolithic
content, which is problematic for block fragmentation, especially for
column balancing.

Instead, store trailing clearance in the layout result, so that the
block layout algorithm can add it to the layout position for subsequent
content.

We already use a similar trick for ruby annotations, and some care is
required so that we don't move back above the clearance offset when
canceling ruby annotations overflow (which happens in some cases). There
was no test coverage for this, so added three tests for that (they pass
both and without this CL).

Also added a multicol test that demonstrates what this fixes in column
balancing.

Bug: 829028
Change-Id: I84e58326e9ada78e3f29ad01d8043a173626aea3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3168645
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923502}

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.

Including clearance in the line height may result in tall monolithic
content, which is problematic for block fragmentation, especially for
column balancing.

Instead, store trailing clearance in the layout result, so that the
block layout algorithm can add it to the layout position for subsequent
content.

We already use a similar trick for ruby annotations, and some care is
required so that we don't move back above the clearance offset when
canceling ruby annotations overflow (which happens in some cases). There
was no test coverage for this, so added three tests for that (they pass
both and without this CL).

Also added a multicol test that demonstrates what this fixes in column
balancing.

Bug: 829028
Change-Id: I84e58326e9ada78e3f29ad01d8043a173626aea3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3168645
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923502}
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