Files
rust_browser/tests/goldens/expected/051-child-vs-descendant.layout.txt
Zachary D. Rowitsch de0afa12a1 Fix 4 rendering bugs: HTML table parsing, background-position axes, deferred absolute layout, half-leading line-height
- HTML parser: Add implicit tag closing for table elements (td, th, tr, tbody, thead, tfoot) per HTML5 §12.2.6.4
- CSS background-position: Swap axes when Y-only keyword (top/bottom) appears first or X-only keyword (left/right) appears second
- Canvas background: Propagate background image ID from root/body layout box to canvas
- Absolute positioning: Defer layout of absolute children until containing block height is finalized, fixing bottom:0 in auto-height containers
- Inline line-height: Implement CSS half-leading model (CSS2 §10.8.1) so line box height uses CSS line-height, not font metrics
- Anonymous text boxes: Inherit line_height and vertical_align from parent styles
- Default vertical_align changed from Top to Baseline per CSS spec

WPT: +3 promoted (abspos-containing-block-005, abspos-width-004, background-color-animation-with-table2), -9 demoted

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:16:11 -05:00

98 lines
4.6 KiB
Plaintext

LayoutBox node=#2 tag=html box=block
content: (0, 0, 800, 92.8)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#10 tag=body box=block
content: (8, 8, 784, 76.8)
padding: 0 0 0 0
border: 0 0 0 0
margin: 8 8 8 8
LayoutBox node=#12 tag=div box=block
content: (8, 8, 784, 76.8)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#14 tag=div box=block
content: (8, 8, 784, 19.2)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
inline_context: 1 lines, height=19.2, max_width=153.91483
line[0]: rect=(8, 8, 153.91483, 19.2) fragments=5
frag[0]: rect=(8, 9.6, 32.963287, 16) text="Direct" start=false end=false
frag[1]: rect=(44.01762, 9.6, 26.18502, 16) text="child" start=false end=false
frag[2]: rect=(73.256966, 9.6, 41.033775, 16) text="(should" start=false end=false
frag[3]: rect=(117.34507, 9.6, 13.85022, 16) text="be" start=false end=false
frag[4]: rect=(134.24962, 9.6, 27.6652, 16) text="blue)" start=false end=false
LayoutBox node=#15 tag=anonymous box=anon
content: (0, 0, 153.91483, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "Direct child (should..."
LayoutBox node=#17 tag=div box=block
content: (8, 27.2, 784, 19.2)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#19 tag=div box=block
content: (8, 27.2, 784, 19.2)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
inline_context: 1 lines, height=19.2, max_width=207.04846
line[0]: rect=(8, 27.2, 207.04846, 19.2) fragments=8
frag[0]: rect=(8, 28.800001, 24.634361, 16) text="NOT" start=false end=false
frag[1]: rect=(35.688694, 28.800001, 6.590308, 16) text="a" start=false end=false
frag[2]: rect=(45.333336, 28.800001, 31.612335, 16) text="direct" start=false end=false
frag[3]: rect=(80, 28.800001, 26.18502, 16) text="child" start=false end=false
frag[4]: rect=(109.23935, 28.800001, 11.148312, 16) text="of" start=false end=false
frag[5]: rect=(123.44199, 28.800001, 39.94126, 16) text=".parent" start=false end=false
frag[6]: rect=(166.43759, 28.800001, 17.891336, 16) text="(no" start=false end=false
frag[7]: rect=(187.38327, 28.800001, 27.6652, 16) text="blue)" start=false end=false
LayoutBox node=#20 tag=anonymous box=anon
content: (0, 0, 207.04848, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "NOT a direct child o..."
LayoutBox node=#23 tag=div box=block
content: (8, 46.4, 784, 19.200005)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
inline_context: 1 lines, height=19.200005, max_width=143.02496
line[0]: rect=(8, 46.4, 143.02496, 19.2) fragments=3
frag[0]: rect=(8, 48, 32.963287, 16) text="Direct" start=false end=false
frag[1]: rect=(44.01762, 48, 64.317184, 16) text="descendant" start=false end=false
frag[2]: rect=(111.38914, 48, 39.635826, 16) text="(green)" start=false end=false
LayoutBox node=#24 tag=anonymous box=anon
content: (0, 0, 143.02496, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "Direct descendant (g..."
LayoutBox node=#26 tag=div box=block
content: (8, 65.600006, 784, 19.199997)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#28 tag=div box=block
content: (8, 65.600006, 784, 19.199997)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
inline_context: 1 lines, height=19.199997, max_width=174.74303
line[0]: rect=(8, 65.600006, 174.74303, 19.2) fragments=4
frag[0]: rect=(8, 67.200005, 39.27166, 16) text="Nested" start=false end=false
frag[1]: rect=(50.325993, 67.200005, 64.317184, 16) text="descendant" start=false end=false
frag[2]: rect=(117.6975, 67.200005, 25.879587, 16) text="(also" start=false end=false
frag[3]: rect=(146.63142, 67.200005, 36.111603, 16) text="green)" start=false end=false
LayoutBox node=#29 tag=anonymous box=anon
content: (0, 0, 174.74303, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "Nested descendant (a..."