Files
rust_browser/tests/goldens/expected/158-table-with-caption.layout.txt
Zachary D. Rowitsch 0eaa317d6b Implement CSS 2.1 §17.2.1 anonymous table object generation
Add proper anonymous table object wrapping so non-proper children of a
table (anything other than TableRow, TableRowGroup, TableCaption) are
wrapped in anonymous rows, and non-cell children of rows are wrapped in
anonymous cells. This fixes the ACID2 pattern where a display:table
element with mixed table-cell, table, and block children should produce
one row with four cells.

Key changes:
- Add BoxType::TableCaption variant (previously mapped to Block)
- Rewrite normalize_table_children() to wrap all non-proper children
- Add wrap_non_cells_in_anonymous_cells() for row child normalization
- Add normalize_all_row_children() wired into both border models
- Add TableCaption to establishes_bfc() per CSS 2.1 §17.1.1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 05:06:28 -05:00

6.3 KiB