Commit c740cb6
[line-clamp] Disable
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}overflow-wrap in a line with the ellipsis1 parent 9a82027 commit c740cb6
2 files changed
Lines changed: 25 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments