Grid items (Block boxes) need to establish their own inline formatting context to create line boxes for text content. Previously, layout_grid_item_children dispatched calculate_block_layout on each child individually, but anonymous text nodes have no children of their own, so their IFC was always empty. The fix calls layout_block_children on the grid item itself, which properly flattens text children into line boxes. Also adds grid test coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
72 lines
2.5 KiB
Plaintext
72 lines
2.5 KiB
Plaintext
LayoutBox node=#2 tag=html box=block
|
|
content: (0, 0, 800, 86)
|
|
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, 70)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 8 8 8 8
|
|
LayoutBox node=#12 tag=div box=grid
|
|
content: (8, 8, 784, 70)
|
|
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, 100, 30)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
inline_context: 1 lines, height=19.2, max_width=6.71953
|
|
line[0]: rect=(8, 8, 6.71953, 19.2) fragments=1
|
|
frag[0]: rect=(8, 8, 6.71953, 16) text="1" start=false end=false
|
|
LayoutBox node=#15 tag=anonymous box=anon
|
|
content: (0, 0, 6.71953, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "1"
|
|
LayoutBox node=#17 tag=div box=block
|
|
content: (128, 8, 100, 30)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
inline_context: 1 lines, height=19.2, max_width=6.719528
|
|
line[0]: rect=(128, 8, 6.719528, 19.2) fragments=1
|
|
frag[0]: rect=(128, 8, 6.71953, 16) text="2" start=false end=false
|
|
LayoutBox node=#18 tag=anonymous box=anon
|
|
content: (0, 0, 6.71953, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "2"
|
|
LayoutBox node=#20 tag=div box=block
|
|
content: (8, 48, 100, 30)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
inline_context: 1 lines, height=19.199997, max_width=6.71953
|
|
line[0]: rect=(8, 48, 6.71953, 19.2) fragments=1
|
|
frag[0]: rect=(8, 48, 6.71953, 16) text="3" start=false end=false
|
|
LayoutBox node=#21 tag=anonymous box=anon
|
|
content: (0, 0, 6.71953, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "3"
|
|
LayoutBox node=#23 tag=div box=block
|
|
content: (128, 48, 100, 30)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
inline_context: 1 lines, height=19.199997, max_width=6.719528
|
|
line[0]: rect=(128, 48, 6.719528, 19.2) fragments=1
|
|
frag[0]: rect=(128, 48, 6.71953, 16) text="4" start=false end=false
|
|
LayoutBox node=#24 tag=anonymous box=anon
|
|
content: (0, 0, 6.71953, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "4"
|