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

[css-text] Consider breaking opportunities of inline siblings #19651

Merged
merged 1 commit into from Oct 29, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Oct 11, 2019

First of all, bear in mind that this change affects only to
intrinsic size computation in legacy layout.

During the intrinsic size computation of blocks with inline children,
we are determining the breaking opportunities for each child. When the
word-break: break-word is used, each of this breaking opportunities
should account for the min-content size.

We only consider breakable locations for start and end if they are
br elements or spaces, under auto-wrap, to compute the intrinsic size
of a box. This is fine, since we are already using a break iterator
to determine the min-size of each word. However, we were incorrectly
summing the first_line_min_width for each inline sibling, even when
they were part of the same text line.

This change tries to avoid that problem by assuming that there is
always a breaking opportunity after every character, since the
spec now states that break-word should behave as normal and
overflow-wrap: anywhere.

Bug: 1013644
Change-Id: I04261b323cd029a624724363a566fccc826863af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1856959
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Cr-Commit-Position: refs/heads/master@{#710359}

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.

Already reviewed downstream.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1856959 branch 6 times, most recently from f9ce22a to af59abc Compare October 25, 2019 19:00
First of all, bear in mind that this change affects only to
intrinsic size computation in legacy layout.

During the intrinsic size computation of blocks with inline children,
we are determining the breaking opportunities for each child. When the
word-break: break-word is used, each of this breaking opportunities
should account for the min-content size.

We only consider breakable locations for start and end if they are
br elements or spaces, under auto-wrap, to compute the intrinsic size
of a box. This is fine, since we are already using a break iterator
to determine the min-size of each word. However, we were incorrectly
summing the first_line_min_width for each inline sibling, even when
they were part of the same text line.

This change tries to avoid that problem by assuming that there is
always a breaking opportunity after every character, since the
spec now states that break-word should behave as normal and
overflow-wrap: anywhere.

Bug: 1013644
Change-Id: I04261b323cd029a624724363a566fccc826863af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1856959
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Cr-Commit-Position: refs/heads/master@{#710359}
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