mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
Replace content_box_rect_in_static_position_ancestor_coordinate_space() which walked the ancestor chain to compute the offset between an abspos element's static position containing block and its actual containing block. Instead, add a cumulative_offset() method to UsedValues that computes the absolute offset from the ICB to a box's content edge by walking the containing block chain. For pre-populated nodes during partial relayout, it returns a cached value from the paintable's absolute position. The static-CB-to-actual-CB offset is now a simple subtraction of two cumulative offsets, which also fixes a bug where table cells with position:relative ancestors got incorrect static positions due to the old function accumulating offsets in the wrong coordinate space. Also route direct UsedValues::offset assignments in Flex, Grid, and Table formatting contexts through set_content_offset().
45 lines
2.9 KiB
Plaintext
45 lines
2.9 KiB
Plaintext
Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline
|
|
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 26 0+0+0] [BFC] children: not-inline
|
|
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 10 0+0+8] children: not-inline
|
|
TableWrapper <(anonymous)> at [8,8] [0+0+0 6 0+0+778] [0+0+0 10 0+0+0] [BFC] children: not-inline
|
|
Box <table> at [8,8] table-box [0+0+0 6 0+0+0] [0+0+0 10 0+0+0] [TFC] children: not-inline
|
|
BlockContainer <(anonymous)> (not painted) children: inline
|
|
TextNode <#text> (not painted)
|
|
TextNode <#text> (not painted)
|
|
Box <tbody> at [10,10] table-row-group [0+0+0 2 0+0+0] [0+0+0 6 0+0+0] children: not-inline
|
|
Box <tr> at [10,10] table-row [0+0+0 2 0+0+0] [0+0+0 2 0+0+0] children: not-inline
|
|
BlockContainer <td> at [11,11] table-cell [0+0+1 0 1+0+0] [0+0+1 0 1+0+0] [BFC] children: not-inline
|
|
BlockContainer <(anonymous)> (not painted) children: inline
|
|
TextNode <#text> (not painted)
|
|
Box <tr> at [10,14] positioned table-row [0+0+0 2 0+0+0] [0+0+0 2 0+0+0] children: not-inline
|
|
BlockContainer <(anonymous)> (not painted) children: inline
|
|
TextNode <#text> (not painted)
|
|
BlockContainer <td> at [11,15] table-cell [0+0+1 0 1+0+0] [0+0+1 0 1+0+0] [BFC] children: not-inline
|
|
BlockContainer <div> at [11,15] positioned [0+0+0 70.5625 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline
|
|
frag 0 from TextNode start: 0, length: 6, rect: [11,15 70.5625x18] baseline: 13.796875
|
|
"ABSPOS"
|
|
TextNode <#text> (not painted)
|
|
BlockContainer <(anonymous)> (not painted) children: inline
|
|
TextNode <#text> (not painted)
|
|
BlockContainer <(anonymous)> (not painted) children: inline
|
|
TextNode <#text> (not painted)
|
|
BlockContainer <(anonymous)> at [8,18] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
|
TextNode <#text> (not painted)
|
|
|
|
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|
PaintableWithLines (BlockContainer<HTML>) [0,0 800x26]
|
|
PaintableWithLines (BlockContainer<BODY>) [8,8 784x10]
|
|
PaintableWithLines (TableWrapper(anonymous)) [8,8 6x10]
|
|
PaintableBox (Box<TABLE>) [8,8 6x10]
|
|
PaintableBox (Box<TBODY>) [10,10 2x6]
|
|
PaintableBox (Box<TR>) [10,10 2x2]
|
|
PaintableWithLines (BlockContainer<TD>) [10,10 2x2]
|
|
PaintableBox (Box<TR>) [10,14 2x2]
|
|
PaintableWithLines (BlockContainer<TD>) [10,14 2x2]
|
|
PaintableWithLines (BlockContainer<DIV>) [11,15 70.5625x18]
|
|
TextPaintable (TextNode<#text>)
|
|
PaintableWithLines (BlockContainer(anonymous)) [8,18 784x0]
|
|
|
|
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
|
SC for BlockContainer<HTML> [0,0 800x26] [children: 0] (z-index: auto)
|