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

LibWeb: Fix for absolutely positioned elements with specified height

Use inner height since the paintable adds padding back.

Fixes #18842.
This commit is contained in:
Andi Gallo 2023-05-15 06:33:06 +00:00 committed by Andreas Kling
parent 3e12d84f0f
commit 9a6a635e51
3 changed files with 55 additions and 5 deletions

View file

@ -0,0 +1,12 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x16 [BFC] children: not-inline
BlockContainer <(anonymous)> at (0,0) content-size 800x0 children: inline
TextNode <#text>
BlockContainer <body> at (8,8) content-size 784x0 children: inline
TextNode <#text>
BlockContainer <h1> at (76.590553,103.754333) content-size 126x38 positioned [BFC] children: inline
line 0 width: 37.21875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 4, rect: [120.590553,103.754333 37.21875x17.46875]
"Test"
TextNode <#text>
TextNode <#text>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<head>
<style>
* {
box-sizing: border-box;
}
h1 {
position: absolute;
top: 12mm;
left: 20mm;
width: 128px;
height: 128px;
font-size: 20px;
text-align: center;
padding: 44px 0;
border: 1px solid black;
}
</style>
</head>
<body>
<h1>Test</h1>
</body>
</html>