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>
14 lines
1010 B
Plaintext
14 lines
1010 B
Plaintext
DisplayList items=12
|
|
Border rect=(8, 8, 784, 70.4) widths=(1 1 1 1) colors=(#000000 #000000 #000000 #000000)
|
|
SolidRect rect=(11, 11, 319.0017, 31.2) color=#ff0000
|
|
Border rect=(11, 11, 319.0017, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(17, 17, 21.157122, 16) text="Red" color=#000000 font_size=16
|
|
SolidRect rect=(332.0017, 11, 456.99826, 31.2) color=#008000
|
|
Border rect=(332.0017, 11, 456.99826, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(338.0017, 17, 33.91483, 16) text="Green" color=#000000 font_size=16
|
|
SolidRect rect=(11, 44.2, 319.0017, 31.2) color=#0000ff
|
|
Border rect=(11, 44.2, 319.0017, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(17, 50.2, 24.55213, 16) text="Blue" color=#000000 font_size=16
|
|
Border rect=(332.0017, 44.2, 456.99826, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(338.0017, 50.2, 40.36417, 16) text="Default" color=#000000 font_size=16
|