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

LibWeb: Set margin, padding and border for replaced boxes

Separating the paths for replaced and non-replaced floating boxes lost
the logic for margin, padding and border which was done by
compute_width_for_floating_box. Set them the same way as we do for
block-level replaced elements, per the specification.
This commit is contained in:
Andi Gallo 2023-05-30 01:28:28 +00:00 committed by Andreas Kling
parent e48074e401
commit 7f9ede07bc
3 changed files with 66 additions and 1 deletions

View file

@ -0,0 +1,16 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x116 [BFC] children: not-inline
BlockContainer <(anonymous)> at (0,0) content-size 800x0 children: inline
TextNode <#text>
BlockContainer <body> at (8,16) content-size 784x17.46875 children: not-inline
BlockContainer <(anonymous)> at (8,16) content-size 784x0 children: inline
TextNode <#text>
ImageBox <img> at (8,16) content-size 200x100 floating children: not-inline
TextNode <#text>
BlockContainer <p> at (8,16) content-size 784x17.46875 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: [228,16 37.21875x17.46875]
"Test"
TextNode <#text>
BlockContainer <(anonymous)> at (8,49.46875) content-size 784x0 children: inline
TextNode <#text>