Skip to content

merge_pr_53253

Compare
Choose a tag to compare
@github-actions github-actions released this 18 Jun 19:17

[line-clamp] Disable overflow-wrap in a line with the ellipsis

Per the specification of block-ellipsis (one of the unexposed
longhands that line-clamp is a shorthand for in the spec), the
line-clamp ellipsis is placed after the last soft wrap opportunity
that still allows the ellipsis to fit in the line, where soft wrap
opportunities added by overflow-wrap are ignored.

A previous CL, https://crrev.com/c/6394977, tried to implement this,
and added a WPT test for it (block-ellipsis-016.html). However, it
only tested and handled the case where the line would have overflown
because it had text-wrap: nowrap, which was also handled specially
with the line-clamp ellipsis. It did not handle cases where the line
overflows because it has no soft wrap opportunities. This CL fixes
that by not setting break_anywhere_if_overflow_ when the line has a
line-clamp ellipsis.

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