-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1925134 [wpt PR 48655] - [text-decoration] Fix crashes for multil…
…ine ellipsis with `::first-line`, a=testonly Automatic update from web-platform-tests [text-decoration] Fix crashes for multiline ellipsis with `::first-line` The ellipsis should be styled according to the block[1]. It was using the first-line style of the block, because it's the common case, and it's the same style unless `::first-line` is applied. This patch changes it to distinguish ellipsis on the first line from other cases. Wrong style can cause wrong rendering, but when `text-decoration` is involved, it can confuse decoration box calculation and result in crashes. This patch fixes both the crashes and the correctness. [1] https://www.w3.org/TR/css-overflow-3/#ellipsing-details Fixed: 358957652 Change-Id: I26af0ae034876bdc0b0cc114670c52d24e2f36a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5936973 Commit-Queue: Kent Tamura <tkentchromium.org> Auto-Submit: Koji Ishii <kojiichromium.org> Reviewed-by: Kent Tamura <tkentchromium.org> Cr-Commit-Position: refs/heads/main{#1369664} -- wpt-commits: 1c795222d59595eadcd348faf86334ae6877224c wpt-pr: 48655 UltraBlame original commit: 0b00916015c0f7f22be9ad761d572057db9b02fc
- Loading branch information
Showing
3 changed files
with
245 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
testing/web-platform/tests/css/css-ui/crashtests/text-overflow-ellipsis-multiline-crash.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
< | ||
! | ||
DOCTYPE | ||
html | ||
> | ||
< | ||
style | ||
> | ||
div | ||
{ | ||
width | ||
: | ||
5ch | ||
; | ||
overflow | ||
: | ||
hidden | ||
; | ||
text | ||
- | ||
overflow | ||
: | ||
ellipsis | ||
; | ||
} | ||
div | ||
: | ||
: | ||
first | ||
- | ||
line | ||
{ | ||
text | ||
- | ||
decoration | ||
: | ||
underline | ||
; | ||
} | ||
< | ||
/ | ||
style | ||
> | ||
< | ||
div | ||
> | ||
< | ||
br | ||
> | ||
1234567 | ||
< | ||
/ | ||
div | ||
> |
63 changes: 63 additions & 0 deletions
63
...ing/web-platform/tests/css/css-ui/reference/text-overflow-ellipsis-multiline-001-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
< | ||
! | ||
DOCTYPE | ||
html | ||
> | ||
< | ||
style | ||
> | ||
div | ||
{ | ||
width | ||
: | ||
6ch | ||
; | ||
overflow | ||
: | ||
hidden | ||
; | ||
text | ||
- | ||
overflow | ||
: | ||
ellipsis | ||
; | ||
} | ||
div | ||
. | ||
first | ||
- | ||
line | ||
{ | ||
color | ||
: | ||
orange | ||
; | ||
} | ||
< | ||
/ | ||
style | ||
> | ||
< | ||
div | ||
class | ||
= | ||
" | ||
first | ||
- | ||
line | ||
" | ||
> | ||
1234567 | ||
< | ||
/ | ||
div | ||
> | ||
< | ||
div | ||
> | ||
1234567 | ||
< | ||
/ | ||
div | ||
> |
128 changes: 128 additions & 0 deletions
128
testing/web-platform/tests/css/css-ui/text-overflow-ellipsis-multiline-001.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
< | ||
! | ||
DOCTYPE | ||
html | ||
> | ||
< | ||
title | ||
> | ||
Test | ||
multiline | ||
ellipsis | ||
with | ||
: | ||
: | ||
first | ||
- | ||
line | ||
< | ||
/ | ||
title | ||
> | ||
< | ||
link | ||
rel | ||
= | ||
" | ||
match | ||
" | ||
href | ||
= | ||
" | ||
reference | ||
/ | ||
text | ||
- | ||
overflow | ||
- | ||
ellipsis | ||
- | ||
multiline | ||
- | ||
001 | ||
- | ||
ref | ||
. | ||
html | ||
" | ||
> | ||
< | ||
link | ||
rel | ||
= | ||
" | ||
help | ||
" | ||
href | ||
= | ||
" | ||
https | ||
: | ||
/ | ||
/ | ||
drafts | ||
. | ||
csswg | ||
. | ||
org | ||
/ | ||
css | ||
- | ||
ui | ||
- | ||
3 | ||
/ | ||
# | ||
ellipsing | ||
- | ||
details | ||
" | ||
> | ||
< | ||
style | ||
> | ||
div | ||
{ | ||
width | ||
: | ||
6ch | ||
; | ||
overflow | ||
: | ||
hidden | ||
; | ||
text | ||
- | ||
overflow | ||
: | ||
ellipsis | ||
; | ||
} | ||
div | ||
: | ||
: | ||
first | ||
- | ||
line | ||
{ | ||
color | ||
: | ||
orange | ||
; | ||
} | ||
< | ||
/ | ||
style | ||
> | ||
< | ||
div | ||
> | ||
1234567 | ||
< | ||
br | ||
> | ||
1234567 | ||
< | ||
/ | ||
div | ||
> |