1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:07:34 +00:00

LibWeb: Fix bogus percentage vertical padding with box-sizing:border-box

The padding-top and padding-bottom properties are relative to the
*width* of the containing block, not the height.

It's funny how we keep making this same mistake again and again. :^)
This commit is contained in:
Andreas Kling 2023-03-10 11:32:29 +01:00
parent 07f6ee9e73
commit 24d5a9d7df
3 changed files with 42 additions and 2 deletions

View file

@ -0,0 +1,18 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x30 children: not-inline
BlockContainer <body> at (10,10) content-size 780x12 children: not-inline
BlockContainer <(anonymous)> at (10,10) content-size 780x0 children: inline
TextNode <#text>
BlockContainer <div.cb> at (11,11) content-size 600x10 children: not-inline
BlockContainer <(anonymous)> at (11,11) content-size 600x0 children: inline
TextNode <#text>
BlockContainer <div.foo> at (12,72) content-size 598x18.000007 children: inline
line 0 width: 24.859375, height: 19.359375, bottom: 19.359375, baseline: 15.5
frag 0 from TextNode start: 0, length: 3, rect: [12,72 24.859375x19.359375]
"foo"
TextNode <#text>
BlockContainer <(anonymous)> at (11,211) content-size 600x19.359375 children: inline
line 0 width: 25.21875, height: 19.359375, bottom: 19.359375, baseline: 15.5
frag 0 from TextNode start: 1, length: 3, rect: [11,211 25.21875x19.359375]
"bar"
TextNode <#text>