LibWeb: Honor box-sizing for block-level replaced element widths

Before this change, we were always behaving as if box-sizing were
content-box for block-level replaced element widths.

This fixes the squishy logo on https://videolan.org/
This commit is contained in:
Andreas Kling 2025-07-13 16:38:33 +02:00 committed by Jelle Raaijmakers
commit 11fa5fdd47
Notes: github-actions[bot] 2025-07-14 09:17:25 +00:00
3 changed files with 31 additions and 1 deletions

View file

@ -0,0 +1,14 @@
<!doctype html><style>
* { outline: 1px solid black; }
body {
float: left;
}
img {
display: block;
padding-left: 50px;
padding-right: 50px;
width: 400px;
height: 400px;
box-sizing: border-box;
}
</style><body><img src="../400.png" />