Closed Bug 1973689 Opened 10 months ago Closed 10 months ago

[wpt-sync] Sync PR 53349 - [line-clamp] Make text-wrap: balance work with the line-clamp ellipsis

Categories

(Core :: Layout: Text and Fonts, task, P4)

task

Tracking

()

RESOLVED FIXED
142 Branch
Tracking Status
firefox142 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Andreu Botella <abotella@igalia.com> wrote:

[line-clamp] Make text-wrap: balance work with the line-clamp ellipsis

(This CL is an alternative approach to the crrev.com/c/6543867,
crrev.com/c/6544146 and crrev.com/c/6543587 relation chain.)

With the LineClampLineBreakingEllipsis flag, which takes into
account the width of the line-clamp ellipsis during line breaking,
this width must be passed into the LineBreaker instance, since it
can't compute it based on the inline items.

This is handled when LineBreaker is used in InlineLayoutAlgorithm,
but it isn't when it is used in ScoreLineBreaker and
ParagraphLineBreaker to implement text-wrap: {balance,pretty}. To
make text-wrap: balance handle the ellipsis properly, we choose to
only implement this handling in ParagraphLineBreaker, so we disable
score line breaking when line clamping. In order to determine the
ellipsis width in ParagraphLineBreaker, we also add an
InlineLayoutAlgorithm::ShapeLineClampEllipsis static method.

Although this CL does not add any support for line-clamp together
with text-wrap: pretty, while working on this patch we noticed a
crash when those two features were used together. As a result, this
patch also adds a text-wrap: pretty crash test.

Bug: 40336192
Change-Id: I5cbaa2d89fb8eef58908ebfe35ef356c4de24cfa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6641006
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Commit-Queue: Andreu Botella \<abotella@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1477817}

Component: web-platform-tests → Layout: Text and Fonts
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, and Chrome on GitHub CI

Total 3 tests

Status Summary

Firefox

FAIL: 3

Chrome

FAIL: 3

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
You need to log in before you can comment on or make changes to this bug.