Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[block-in-inline] Support line-clamping correctly.
To do this we always set the correct "lines-util-clamp" on the layout result, and just read that within the block-layout-algorithm. For non block-in-inline layout there should be no behaviour change. Bug: 716930 Change-Id: Ib8fc361f356943f385becd7503fa152d1f0f091d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3111327 Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/main@{#914520}
- Loading branch information
1 parent
b5c4ae1
commit 78754a4
Showing
4 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
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,16 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
.clamp { | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
-webkit-line-clamp: 3; | ||
font: 16px / 32px serif; | ||
background-color: yellow; | ||
overflow: hidden; | ||
} | ||
</style> | ||
<div class="clamp"> | ||
<div> | ||
Line 1<br>Line 2<br>Line 3<br>Line 4<br>Line 5 | ||
</div> | ||
</div> |
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,16 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
.clamp { | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
-webkit-line-clamp: 5; | ||
font: 16px / 32px serif; | ||
background-color: yellow; | ||
overflow: hidden; | ||
} | ||
</style> | ||
<div class="clamp"> | ||
<div> | ||
Line 1<br>Line 2<br>Line 3<br>Line 4<br>Line 5<br>Line 6 | ||
</div> | ||
</div> |
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,21 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#webkit-line-clamp"> | ||
<link rel="match" href="reference/webkit-line-clamp-038-ref.html"> | ||
<meta name="assert" content="-webkit-line-clamp correctly clamps a block-in-inline."> | ||
<style> | ||
.clamp { | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
-webkit-line-clamp: 3; | ||
font: 16px / 32px serif; | ||
background-color: yellow; | ||
overflow: hidden; | ||
} | ||
</style> | ||
<div class="clamp"> | ||
<div> | ||
Line 1 | ||
<span><div>Line 2<br>Line 3<br>Line 4</div></span> | ||
Line 5 | ||
</div> | ||
</div> |
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,21 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#webkit-line-clamp"> | ||
<link rel="match" href="reference/webkit-line-clamp-039-ref.html"> | ||
<meta name="assert" content="-webkit-line-clamp correctly clamps a block-in-inline."> | ||
<style> | ||
.clamp { | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
-webkit-line-clamp: 5; | ||
font: 16px / 32px serif; | ||
background-color: yellow; | ||
overflow: hidden; | ||
} | ||
</style> | ||
<div class="clamp"> | ||
<div> | ||
Line 1 | ||
<span><div>Line 2<br>Line 3<br>Line 4</div></span> | ||
Line 5<br>Line 6 | ||
</div> | ||
</div> |