Files
ladybird/Tests/LibWeb/Layout/expected/block-and-inline/float-inside-margin-auto-container.txt
Jelle Raaijmakers 99df80f81e LibWeb: Only apply box offset if the box is not already the ancestor
When determining the content/margin box rects within their ancestor's
coordinate space, we were returning early if the passed in values
already belonged to the requested ancestor. Unfortunately, we had
already applied the used values' offset to the rect, which is the offset
to the ancestor's ancestor.

This simplifies the logic to always apply the rect offset after checking
if we've reached the ancestor. Fixes determining float intrusions inside
block elements with `margin: auto` set.

Fixes #4083.
2025-04-04 15:35:26 +02:00

20 lines
1.1 KiB
Plaintext

Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x316 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x300 children: not-inline
BlockContainer <div.a> at (300,8) content-size 200x300 [BFC] children: inline
TextNode <#text>
BlockContainer <div.b.g> at (300,8) content-size 150x150 floating [BFC] children: not-inline
TextNode <#text>
BlockContainer <div.b.r> at (300,158) content-size 150x150 floating [BFC] children: not-inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,308) content-size 784x0 children: inline
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x316]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x300]
PaintableWithLines (BlockContainer<DIV>.a) [300,8 200x300]
PaintableWithLines (BlockContainer<DIV>.b.g) [300,8 150x150]
PaintableWithLines (BlockContainer<DIV>.b.r) [300,158 150x150]
PaintableWithLines (BlockContainer(anonymous)) [8,308 784x0]