Tables with <caption> elements were invisible because normalize_children treated TableRowGroup/TableRow/TableCell as inline-level, causing them to be wrapped in anonymous blocks when mixed with the caption (Block). The table layout algorithm then couldn't find row groups among direct children. Three fixes: - Add table-internal types to is_block_level in normalize_children and determine_formatting_context so they aren't incorrectly wrapped - Add table-internal types to render_non_inline_descendants in the display list builder so they render when nested in inline contexts - Implement caption layout in calculate_table_layout: captions are laid out as blocks above the table rows, with rows offset accordingly - Add text-align: center to caption in UA stylesheet per CSS spec Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
1.3 KiB
Plaintext
17 lines
1.3 KiB
Plaintext
DisplayList items=15
|
|
Border rect=(8, 8, 784, 103.600006) widths=(1 1 1 1) colors=(#000000 #000000 #000000 #000000)
|
|
SolidRect rect=(11, 11, 447.36157, 31.2) color=#d3d3d3
|
|
Border rect=(11, 11, 447.36157, 31.2) widths=(1 1 1 1) colors=(#000000 #000000 #000000 #000000)
|
|
Text rect=(17, 17, 35.05433, 16) text="Name" color=#000000 font_size=16 font_weight=700
|
|
SolidRect rect=(460.36157, 11, 328.63852, 31.2) color=#d3d3d3
|
|
Border rect=(460.36157, 11, 328.63852, 31.2) widths=(1 1 1 1) colors=(#000000 #000000 #000000 #000000)
|
|
Text rect=(466.36157, 17, 22.566814, 16) text="Age" color=#000000 font_size=16 font_weight=700
|
|
Border rect=(11, 44.2, 447.36157, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(17, 50.2, 25.8326, 16) text="Alice" color=#000000 font_size=16
|
|
Border rect=(460.36157, 44.2, 328.63852, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(466.36157, 50.2, 13.43906, 16) text="30" color=#000000 font_size=16
|
|
Border rect=(11, 77.4, 447.36157, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(17, 83.4, 21.967693, 16) text="Bob" color=#000000 font_size=16
|
|
Border rect=(460.36157, 77.4, 328.63852, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(466.36157, 83.4, 13.43906, 16) text="25" color=#000000 font_size=16
|