Files
rust_browser/tests/goldens/expected/083-table-mixed-spans.dl.txt
Zachary D. Rowitsch f642f4f17c Fix tables with captions not rendering and add caption layout support
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>
2026-02-13 00:24:29 -05:00

16 lines
1.3 KiB
Plaintext

DisplayList items=14
Border rect=(8, 8, 784, 103.600006) widths=(1 1 1 1) colors=(#000000 #000000 #000000 #000000)
Border rect=(11, 11, 544.8801, 64.4) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
Text rect=(17, 17, 19.65345, 16) text="2x2" color=#000000 font_size=16
Text rect=(39.707783, 17, 26.70191, 16) text="span" color=#000000 font_size=16
Border rect=(557.8801, 11, 231.11996, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
Text rect=(563.8801, 17, 14.143906, 16) text="C1" color=#000000 font_size=16
Border rect=(557.8801, 44.2, 231.11996, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
Text rect=(563.8801, 50.2, 14.143906, 16) text="C2" color=#000000 font_size=16
Border rect=(11, 77.4, 270.86887, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
Text rect=(17, 83.4, 14.226138, 16) text="A3" color=#000000 font_size=16
Border rect=(283.86887, 77.4, 272.01123, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
Text rect=(289.86887, 83.4, 14.35536, 16) text="B3" color=#000000 font_size=16
Border rect=(557.8801, 77.4, 231.11996, 31.2) widths=(1 1 1 1) colors=(#808080 #808080 #808080 #808080)
Text rect=(563.8801, 83.4, 14.143906, 16) text="C3" color=#000000 font_size=16