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>
19 lines
1.5 KiB
Plaintext
19 lines
1.5 KiB
Plaintext
DisplayList items=17
|
|
Border rect=(8, 8, 784, 70.4) widths=(1 1 1 1) colors=(#000000 #000000 #000000 #000000)
|
|
Border rect=(11, 11, 138.33546, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(17, 17, 29.908957, 16) text="Short" color=#000000 font_size=16
|
|
Border rect=(151.33546, 11, 527.0319, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(157.33546, 17, 7.506608, 16) text="A" color=#000000 font_size=16
|
|
Text rect=(167.89641, 17, 31.142439, 16) text="much" color=#000000 font_size=16
|
|
Text rect=(202.09319, 17, 36.099854, 16) text="longer" color=#000000 font_size=16
|
|
Text rect=(241.24738, 17, 18.32599, 16) text="cell" color=#000000 font_size=16
|
|
Text rect=(262.6277, 17, 42.372982, 16) text="content" color=#000000 font_size=16
|
|
Border rect=(680.3674, 11, 108.63259, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(686.3674, 17, 20.910425, 16) text="Mid" color=#000000 font_size=16
|
|
Border rect=(11, 44.2, 138.33546, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(17, 50.2, 7.506608, 16) text="A" color=#000000 font_size=16
|
|
Border rect=(151.33546, 44.2, 527.0319, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(157.33546, 50.2, 7.6358294, 16) text="B" color=#000000 font_size=16
|
|
Border rect=(680.3674, 44.2, 108.63259, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
|
|
Text rect=(686.3674, 50.2, 7.424376, 16) text="C" color=#000000 font_size=16
|