mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +00:00
LibWeb: Improve the line breaking algorithm
Check the width of the next token after white space to decide line breaks. The next width can also be the total width of multiple tokens. This better follows the CSS Text specification and matches behavior of other browsers. Fixes #20388.
This commit is contained in:
parent
33b133d3f4
commit
3d7e788981
9 changed files with 227 additions and 13 deletions
25
Tests/LibWeb/Layout/input/table/line-breaking-in-cells.html
Normal file
25
Tests/LibWeb/Layout/input/table/line-breaking-in-cells.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<style>
|
||||
table {
|
||||
border-collapse: collapse
|
||||
}
|
||||
|
||||
td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 30%;">A
|
||||
</td>
|
||||
<td style="width: 40%;">
|
||||
B
|
||||
<br>C
|
||||
</td>
|
||||
<td style="width: 30%;">
|
||||
D
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
Loading…
Add table
Add a link
Reference in a new issue