mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
When positioning floats against an edge, we are taking all current relevant floats at that side into account to determine the Y offset at which to place the new float. However, we were using the margin box height instead of the absolute bottom position, which disregards the current float's Y-position within the root, and we were setting the Y offset to that height, instead of taking the new float's Y position inside of the root into account. The new code determines the lowest margin bottom value within the root of the current floats, and adds the difference between that value and the new float's Y position to the Y offset.
34 lines
1.7 KiB
Plaintext
34 lines
1.7 KiB
Plaintext
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
|
|
BlockContainer <body> at (8,16) content-size 784x51 children: not-inline
|
|
BlockContainer <div> at (8,16) content-size 50x50 floating [BFC] children: not-inline
|
|
BlockContainer <(anonymous)> at (8,16) content-size 784x0 children: inline
|
|
TextNode <#text>
|
|
BlockContainer <p> at (8,16) content-size 784x51 children: inline
|
|
frag 0 from TextNode start: 0, length: 1, rect: [58,16 14.265625x17] baseline: 13.296875
|
|
"A"
|
|
frag 1 from TextNode start: 0, length: 1, rect: [58,33 9.34375x17] baseline: 13.296875
|
|
"B"
|
|
frag 2 from TextNode start: 0, length: 1, rect: [58,50 10.3125x17] baseline: 13.296875
|
|
"C"
|
|
TextNode <#text>
|
|
BreakNode <br>
|
|
TextNode <#text>
|
|
BreakNode <br>
|
|
TextNode <#text>
|
|
BlockContainer <div> at (8,83) content-size 50x50 floating [BFC] children: not-inline
|
|
BlockContainer <(anonymous)> at (8,83) content-size 784x0 children: inline
|
|
TextNode <#text>
|
|
|
|
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
|
|
PaintableWithLines (BlockContainer<BODY>) [8,16 784x51] overflow: [8,16 784x117]
|
|
PaintableWithLines (BlockContainer<DIV>) [8,16 50x50]
|
|
PaintableWithLines (BlockContainer(anonymous)) [8,16 784x0]
|
|
PaintableWithLines (BlockContainer<P>) [8,16 784x51]
|
|
TextPaintable (TextNode<#text>)
|
|
TextPaintable (TextNode<#text>)
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer<DIV>) [8,83 50x50]
|
|
PaintableWithLines (BlockContainer(anonymous)) [8,83 784x0]
|