LibWeb: Don't assume table caption box wants to create a BFC

Instead, use the generic create_independent_formatting_context_if_needed
so that unusual situations like image-as-table-caption don't crash.

This logic clearly needs more work, but let's at least do better than
crashing. This gives us 26 new subtest passes on WPT.
This commit is contained in:
Andreas Kling 2025-04-24 13:33:20 +02:00 committed by Andreas Kling
commit fbb3b06462
Notes: github-actions[bot] 2025-04-24 16:28:10 +00:00
6 changed files with 477 additions and 9 deletions

View file

@ -0,0 +1,46 @@
Harness status: OK
Found 40 tests
26 Pass
14 Fail
Fail Replaced elements inside a table cannot be table-row and are considered inline -- input elements (width)
Fail Replaced elements inside a table cannot be table-row and are considered inline -- input elements (top)
Fail Replaced elements inside a table cannot be table-row and are considered inline -- img elements (width)
Fail Replaced elements inside a table cannot be table-row and are considered inline -- img elements (top)
Fail Replaced elements inside a table cannot be table-column and are considered inline -- input elements (width)
Pass Replaced elements inside a table cannot be table-column and are considered inline -- input elements (top)
Fail Replaced elements inside a table cannot be table-column and are considered inline -- img elements (width)
Pass Replaced elements inside a table cannot be table-column and are considered inline -- img elements (top)
Fail Replaced elements inside a table cannot be table-cell and are considered inline -- input elements (width)
Pass Replaced elements inside a table cannot be table-cell and are considered inline -- input elements (top)
Fail Replaced elements inside a table cannot be table-cell and are considered inline -- img elements (width)
Pass Replaced elements inside a table cannot be table-cell and are considered inline -- img elements (top)
Pass Replaced elements outside a table cannot be inline-table and are considered inline -- input=text elements
Pass Replaced elements outside a table cannot be inline-table and are considered inline -- input=button elements
Pass Replaced elements outside a table cannot be inline-table and are considered inline -- input=file elements
Pass Replaced elements outside a table cannot be inline-table and are considered inline -- img elements
Pass Replaced elements outside a table cannot be table and are considered block -- input=text elements
Pass Replaced elements outside a table cannot be table and are considered block -- input=button elements
Pass Replaced elements outside a table cannot be table and are considered block -- input=file elements
Pass Replaced elements outside a table cannot be table and are considered block -- img elements
Fail Replaced elements outside a table cannot be table-row and are considered inline -- input=text elements
Fail Replaced elements outside a table cannot be table-row and are considered inline -- input=button elements
Fail Replaced elements outside a table cannot be table-row and are considered inline -- input=file elements
Pass Replaced elements outside a table cannot be table-row and are considered inline -- img elements
Fail Replaced elements outside a table cannot be table-row-group and are considered inline -- input=text elements
Fail Replaced elements outside a table cannot be table-row-group and are considered inline -- input=button elements
Fail Replaced elements outside a table cannot be table-row-group and are considered inline -- input=file elements
Pass Replaced elements outside a table cannot be table-row-group and are considered inline -- img elements
Pass Replaced elements outside a table cannot be table-column and are considered inline inline -- input=text elements
Pass Replaced elements outside a table cannot be table-column and are considered inline -- input=button elements
Pass Replaced elements outside a table cannot be table-column and are considered inline -- input=file elements
Pass Replaced elements outside a table cannot be table-column and are considered inline -- img elements
Pass Replaced elements outside a table cannot be table-cell and are considered inline -- input=text elements
Pass Replaced elements outside a table cannot be table-cell and are considered inline -- input=button elements
Pass Replaced elements outside a table cannot be table-cell and are considered inline -- input=file elements
Pass Replaced elements outside a table cannot be table-cell and are considered inline -- img elements
Pass Replaced elements outside a table cannot be table-caption and are considered inline -- input=text elements
Pass Replaced elements outside a table cannot be table-caption and are considered inline -- input=button elements
Pass Replaced elements outside a table cannot be table-caption and are considered inline -- input=file elements
Pass Replaced elements outside a table cannot be table-caption and are considered inline -- img elements