mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 04:47:34 +00:00
LibWeb: Fix whitespace getting trimmed incorrectly
Whitespace at the end of line should only be trimmed when 'white-space' is set to 'normal', 'nowrap', or 'pre-line'.
This commit is contained in:
parent
ce4b09dfd1
commit
92b56ded02
3 changed files with 41 additions and 13 deletions
9
Tests/LibWeb/Layout/expected/pre.txt
Normal file
9
Tests/LibWeb/Layout/expected/pre.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x17.46875 children: inline
|
||||
line 0 width: 21.875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 3, rect: [9,8 19.875x17.46875]
|
||||
" | "
|
||||
InlineNode <pre>
|
||||
TextNode <#text>
|
||||
TextNode <#text>
|
7
Tests/LibWeb/Layout/input/pre.html
Normal file
7
Tests/LibWeb/Layout/input/pre.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<style>
|
||||
pre {
|
||||
display: inline;
|
||||
border: 1px solid #000;
|
||||
}
|
||||
</style>
|
||||
<pre> | </pre>
|
Loading…
Add table
Add a link
Reference in a new issue