Files
rust_browser/tests/goldens/expected/094-table-vertical-align.layout.txt
Zachary D. Rowitsch 2ba3e4ec91 Fix table intrinsic width ignoring CSS width hints and empty table height
Two bugs in table layout:

1. measure_table_intrinsic_width() only measured text/child content,
   ignoring explicit CSS width properties on cells. Cells with
   width: 12px but empty content measured as 0px, making auto-width
   tables too narrow. Fixed by applying Length width hints inline
   during the single-column measurement pass.

2. Empty tables (no rows) ignored specified_height in their early-return
   path, always setting height to 0. Fixed by calling
   calculate_block_height() in both separate and collapsed border model
   paths to resolve explicit CSS heights.

Promotes 3 WPT tests from known_fail to pass.

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

63 lines
2.3 KiB
Plaintext

LayoutBox node=#2 tag=html box=block
content: (0, 0, 800, 100)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#10 tag=body box=block
content: (8, 8, 784, 84)
padding: 0 0 0 0
border: 0 0 0 0
margin: 8 8 8 8
LayoutBox node=#12 tag=table box=table
content: (9, 9, 300, 82)
padding: 0 0 0 0
border: 1 1 1 1
margin: 0 0 0 0
LayoutBox node=#14 tag=tr box=table-row
content: (9, 9, 300, 82)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#16 tag=td box=table-cell
content: (10, 10, 98, 80)
padding: 0 0 0 0
border: 1 1 1 1
margin: 0 0 0 0
inline_context: 1 lines, height=19.2, max_width=20.863436
line[0]: rect=(10, 10, 20.863436, 19.2) fragments=1
frag[0]: rect=(10, 10, 20.863436, 16) text="Top" start=false end=false
LayoutBox node=#17 tag=anonymous box=anon
content: (0, 10, 20.863436, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "Top"
LayoutBox node=#19 tag=td box=table-cell
content: (110, 10, 98, 80)
padding: 0 0 0 0
border: 1 1 1 1
margin: 0 0 0 0
inline_context: 1 lines, height=19.2, max_width=37.791473
line[0]: rect=(110, 40.4, 37.791473, 19.2) fragments=1
frag[0]: rect=(110, 43.418503, 37.79148, 16) text="Middle" start=false end=false
LayoutBox node=#20 tag=anonymous box=anon
content: (0, 40.4, 37.79148, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "Middle"
LayoutBox node=#22 tag=td box=table-cell
content: (210, 10, 98, 80)
padding: 0 0 0 0
border: 1 1 1 1
margin: 0 0 0 0
inline_context: 1 lines, height=19.2, max_width=41.315704
line[0]: rect=(210, 70.8, 41.315704, 19.2) fragments=1
frag[0]: rect=(210, 74, 41.315712, 16) text="Bottom" start=false end=false
LayoutBox node=#23 tag=anonymous box=anon
content: (0, 70.8, 41.315712, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "Bottom"