Files
ladybird/Tests/LibWeb/Layout/expected/block-size.txt
Andreas Kling 16662ab230 LibWeb: Account for collapsed top margins in BFC root height calculation
By the time we're measuring the height of a BFC root, we've already
collapsed all relevant margins for the root and its descendants.
Given this, we should simply use 0 (relative to the BFC root) as the
lowest block axis coordinate (i.e Y value) for the margin edges.

This fixes a long-standing issue where BFC roots were sometimes not tall
enough to contain their children due to margins.
2025-02-22 18:41:42 +01:00

39 lines
2.0 KiB
Plaintext

Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x1772 [BFC] children: not-inline
BlockContainer <body> at (8,70) content-size 784x1632 children: not-inline
BlockContainer <p.min-block-test> at (8,70) content-size 784x700 children: inline
frag 0 from TextNode start: 0, length: 2, rect: [8,70 85.875x76] baseline: 58.984375
"KK"
TextNode <#text>
BlockContainer <(anonymous)> at (8,840) content-size 784x76 children: inline
TextNode <#text>
BreakNode <br>
TextNode <#text>
BlockContainer <p.max-block-test> at (8,986) content-size 200x100 children: inline
frag 0 from TextNode start: 0, length: 2, rect: [8,986 85.875x76] baseline: 58.984375
"KK"
TextNode <#text>
BlockContainer <(anonymous)> at (8,1156) content-size 784x76 children: inline
TextNode <#text>
BreakNode <br>
TextNode <#text>
BlockContainer <p.block-size-test> at (8,1302) content-size 200x400 children: inline
frag 0 from TextNode start: 0, length: 2, rect: [8,1302 85.875x76] baseline: 58.984375
"KK"
TextNode <#text>
BlockContainer <(anonymous)> at (8,1772) content-size 784x0 children: inline
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x1772]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x1772]
PaintableWithLines (BlockContainer<BODY>) [8,70 784x1632]
PaintableWithLines (BlockContainer<P>.min-block-test) [8,70 784x700]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer(anonymous)) [8,840 784x76]
PaintableWithLines (BlockContainer<P>.max-block-test) [8,986 200x100]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer(anonymous)) [8,1156 784x76]
PaintableWithLines (BlockContainer<P>.block-size-test) [8,1302 200x400]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer(anonymous)) [8,1772 784x0]