layout: Add *very* basic support for table layout (#31121)

* layout: Add *very* basic support for table layout

This is the first step to proper table layout. It implements a naive
layout algorithm, notably only taking into account the preferred widths
of the first table row. Still, it causes some float tests to start
passing, so turn on the `layout.tables.enabled` preference for those
directories.

Co-authored-by: Oriol Brufau <obrufau@igalia.com>

* Address review comments

* Fix a crash with rowspan=0

* Turn on pref and update results for `/css/css-tables` and `/css/CSS2/tables`

---------

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2024-01-19 14:20:20 +01:00 committed by GitHub
parent 3d520f2668
commit fc31e69f79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
115 changed files with 842 additions and 315 deletions

View file

@ -0,0 +1 @@
prefs: ["layout.tables.enabled:true"]

View file

@ -1,2 +0,0 @@
[floats-038.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[floats-149.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[margin-collapse-165.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[margin-collapse-166.xht]
expected: FAIL

View file

@ -0,0 +1 @@
prefs: ["layout.tables.enabled:true"]

View file

@ -0,0 +1,2 @@
[floats-in-table-caption-001.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[floats-wrap-bfc-001-left-overflow.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[floats-wrap-bfc-001-right-overflow.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[floats-wrap-bfc-003-left-overflow.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[floats-wrap-bfc-003-right-overflow.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[floats-wrap-bfc-007.xht]
expected: FAIL

View file

@ -0,0 +1 @@
prefs: ["layout.tables.enabled:true"]

View file

@ -1,2 +0,0 @@
[border-collapse-offset-002.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[empty-cells-applies-to-008.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[empty-cells-applies-to-009.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[empty-cells-applies-to-010.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[empty-cells-applies-to-011.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[empty-cells-applies-to-012.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[empty-cells-applies-to-013.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[empty-cells-applies-to-017.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[height-table-cell-001.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[height-width-inline-table-001.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[height-width-inline-table-001a.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[height-width-inline-table-001b.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[height-width-inline-table-001c.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[height-width-inline-table-001d.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[height-width-inline-table-001e.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[separated-border-model-003a.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[separated-border-model-007.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[separated-border-model-008.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[separated-border-model-009.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[table-anonymous-objects-017.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[table-anonymous-objects-018.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[table-anonymous-objects-019.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[table-anonymous-objects-020.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[table-anonymous-objects-117.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[table-anonymous-objects-119.xht]
expected: FAIL

View file

@ -1,2 +1,2 @@
[table-anonymous-objects-211.xht]
expected: FAIL
expected: CRASH

View file

@ -1,2 +0,0 @@
[table-column-rendering-001.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[table-column-rendering-002.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[table-visual-layout-017.xht]
expected: FAIL