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

LibWeb: Sum horizontal margins to calculate space used by floats

This fixes the issue where max margin is used to find offset of
floating box although horizonal margins do not collapse so they need
to be summed instead.
This commit is contained in:
Aliaksandr Kalenik 2023-05-24 18:16:09 +03:00 committed by Andreas Kling
parent 90d8844c77
commit 202b24584f
5 changed files with 83 additions and 49 deletions

View file

@ -5,7 +5,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
BlockContainer <div.outer> at (9,9) content-size 300x250 children: inline
line 0 width: 204, height: 16, bottom: 16, baseline: 12.796875
frag 0 from TextNode start: 1, length: 23, rect: [60,9 204x16]
frag 0 from TextNode start: 1, length: 23, rect: [61,9 204x16]
"foo bar baz foo bar baz"
TextNode <#text>
BlockContainer <div.lefty> at (10,10) content-size 50x50 floating [BFC] children: not-inline