Commit feedd64
committed
-webkit-line-clamp doesn't support inline-block children
https://bugs.webkit.org/show_bug.cgi?id=301944
<rdar://problem/164488778>
Reviewed by Antti Koivisto.
Let's not propagate legacy line-clamp to inline-block containers.
While propagation should happen across block level containers, inline blocks are quite different as they already participate in the parent inline layout (they themselves sit on lines) and
the lines they produce are visually detached from the line-clamp flow.
e.g.
<div line-clamp: 2>
text before
<div style="display: inline-block>first<br>second<br>thrid</div>
text after
</div>
first
second
text before third text after
(should not clamp after "second")
This also aligns with Chrome's behavior.
Test: fast/flexbox/legacy-line-clamp-on-display-block.html
* LayoutTests/fast/flexbox/legacy-line-clamp-on-display-block-expected.html: Added.
* LayoutTests/fast/flexbox/legacy-line-clamp-on-display-block.html: Added.
* LayoutTests/fast/overflow/line-clamp-on-last-formatted-line-expected.html:
* LayoutTests/fast/overflow/line-clamp-on-last-formatted-line.html:
* Source/WebCore/rendering/LineClampUpdater.h:
(WebCore::LineClampUpdater::LineClampUpdater):
Canonical link: https://commits.webkit.org/304956@main1 parent 2526a45 commit feedd64
File tree
5 files changed
+36
-3
lines changed- LayoutTests/fast
- flexbox
- overflow
- Source/WebCore/rendering
5 files changed
+36
-3
lines changedLines 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 | + | |
Lines changed: 18 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 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
0 commit comments