layout: Implement computation of table column widths (#31165)

* layout: Implement computation of table column widths

This change implements the various steps of table column width
computation, ignoring features that don't exist yet (such as separated
borders, column elements, and colgroups).

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

* Fix an issue with the assignment of column percent width

* Respond to review comments

---------

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2024-01-26 00:13:13 +01:00 committed by GitHub
parent dc34eec4d4
commit d68c7e7881
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 707 additions and 121 deletions

View file

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

View file

@ -0,0 +1,2 @@
[border-collapse-rowspan-cell.html]
expected: FAIL

View file

@ -34,3 +34,6 @@
[main table 9]
expected: FAIL
[main table 3]
expected: FAIL

View file

@ -1,6 +1,3 @@
[fixed-layout-1.html]
[Table-layout:fixed grows the table if needed for minimum-width]
expected: FAIL
[Table-layout:fixed takes visual order into account, not dom order]
expected: FAIL

View file

@ -1,3 +0,0 @@
[fixed-layout-excess-width-distribution-001.html]
[#theTable 1]
expected: FAIL

View file

@ -1,9 +0,0 @@
[fractional-percent-width.html]
[.cell 1]
expected: FAIL
[.cell 2]
expected: FAIL
[.cell 3]
expected: FAIL

View file

@ -2,9 +2,6 @@
[Percentages resolve based on the row height]
expected: FAIL
[Percentages resolve based on the final column width]
expected: FAIL
[Percentages resolve based on the final row height]
expected: FAIL

View file

@ -1,2 +0,0 @@
[table-cell-baseline-static-position.html]
expected: FAIL

View file

@ -20,9 +20,6 @@
[table 7]
expected: FAIL
[table 8]
expected: FAIL
[table 9]
expected: FAIL

View file

@ -7,3 +7,6 @@
[table 5]
expected: FAIL
[table 3]
expected: FAIL

View file

@ -14,12 +14,6 @@
[table 11]
expected: FAIL
[table 1]
expected: FAIL
[table 4]
expected: FAIL
[table 5]
expected: FAIL

View file

@ -0,0 +1,2 @@
[th-text-align.html]
expected: FAIL

View file

@ -1,6 +0,0 @@
[distribution-algo-min-content-percent-guess.html]
[The second cell is 200px due to the 50% set on the first cell and the second gets distributed the remaining space since its auto]
expected: FAIL
[The first cell is 200px due to its 50% specified width is greater than ]
expected: FAIL