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>
9 lines
639 B
Plaintext
9 lines
639 B
Plaintext
DisplayList items=7
|
|
Border rect=(8, 8, 784, 67.2) widths=(1 1 1 1) colors=(#000000 #000000 #000000 #000000)
|
|
Border rect=(11, 11, 318.03552, 61.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(14, 14, 30.08517, 16) text="Small" color=#000000 font_size=16
|
|
Text rect=(47.139503, 14, 45.779736, 16) text="padding" color=#000000 font_size=16
|
|
Border rect=(331.03552, 11, 457.9645, 61.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(352.03552, 32, 31.44787, 16) text="Large" color=#000000 font_size=16
|
|
Text rect=(386.53772, 32, 45.779736, 16) text="padding" color=#000000 font_size=16
|