Closed Bug 1590164 Opened 1 year ago Closed 11 months ago

[wpt-sync] Sync PR 19808 - [css-text] Use always the BreakIterator to compute the intrinsic size

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox72 fixed)

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

Sync web-platform-tests PR 19808 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/19808
Details from upstream follow.

Javier Fernandez <jfernandez@igalia.com> wrote:

[css-text] Use always the BreakIterator to compute the intrinsic size

As part of the preferred width computation of LayoutText objects, we
have an specific function to implement the min-word-fragment of a text.

We are handling the case of break-all and break-word differently, and
that's right. However, we are using the BreakIterator only in case of
break-all. This caused that we consider valid to break grapheme clusters
when computing the min-content size, which leads to wrong values in some
cases, like the one described in the bug.

This CL changes the mentioned logic to rely always into the
BreakIterator, which knows better when is valid to break the text.

Bug: 1013775
Change-Id: Ia152d346a61b6b54eaac185a399b0d572e3aba4d
Reviewed-on: https://chromium-review.googlesource.com/1857319
WPT-Export-Revision: 5b82c1d4fb4458f837a66a53090e9d87bf7ee101

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Component: CSS Parsing and Computation → web-platform-tests
Product: Core → Testing

GitHub CI Results

wpt.fyi PR Results Base Results

Ran 1 tests

Firefox

PASS: 1

Chrome

PASS: 1

Safari

FAIL: 1

Gecko CI Results

Ran 1 tests
PASS : 1

Automatic update from web-platform-tests
[css-text] Use always the BreakIterator to compute the intrinsic size

As part of the preferred width computation of LayoutText objects, we
have an specific function to implement the min-word-fragment of a text.

We are handling the case of break-all and break-word differently, and
that's right. However, we are using the BreakIterator only in case of
break-all. This caused that we consider valid to break grapheme clusters
when computing the min-content size, which leads to wrong values in some
cases, like the one described in the bug.

This CL changes the mentioned logic to rely always into the
BreakIterator, which knows better when is valid to break the text.

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

--

wpt-commits: ae12c777133af976a4ba1d66b138d0fa3cee24d3
wpt-pr: 19808

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f083b4e51563
[wpt PR 19808] - [css-text] Use always the BreakIterator to compute the intrinsic size, a=testonly
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.