layout: Improve distribution colspan cell inline size (#35095)

We previously tried to implement the [table specification algorithm] for
distributing the inline size of cells with `rowspan` > 1. This algorithm
isn't great though, so this change starts switching Servo to using an
algorithm like the one used in LayoutNG from blink. This leads to
improvements in test results.

Limitations:
 - Currently, non-fixed layout mode is handled, but a followup change will
   very likely addressed fixed mode tables.
 - Column merging is not handled at all.

Fixes #6578.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2025-01-21 14:29:55 +01:00 committed by GitHub
parent d00d76c1e8
commit c17668bb0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 282 additions and 417 deletions

View file

@ -1,9 +0,0 @@
[colspan-001.html]
[td 1]
expected: FAIL
[td 2]
expected: FAIL
[td 4]
expected: FAIL

View file

@ -1,9 +0,0 @@
[colspan-002.html]
[td 1]
expected: FAIL
[td 2]
expected: FAIL
[td 4]
expected: FAIL

View file

@ -1,9 +0,0 @@
[colspan-003.html]
[td 1]
expected: FAIL
[td 2]
expected: FAIL
[td 4]
expected: FAIL

View file

@ -1,6 +1,3 @@
[computing-row-measure-1.html]
[Checking intermediate min-content width for span 2 (4)]
expected: FAIL
[Checking intermediate min-content width for span 2 (1)]
expected: FAIL

View file

@ -1,7 +1,4 @@
[html5-table-formatting-3.html]
[Anonymous consecutive columns spanned by the same set of cells are merged]
expected: FAIL
[Explicitely-defined consecutive columns spanned by the same set of cells are not merged, and cells span across border-spacing]
expected: FAIL

View file

@ -8,27 +8,9 @@
[table 3]
expected: FAIL
[table 4]
expected: FAIL
[table 6]
expected: FAIL
[table 9]
expected: FAIL
[table 10]
expected: FAIL
[table 11]
expected: FAIL
[table 12]
expected: FAIL
[table 13]
expected: FAIL
[table 14]
expected: FAIL
@ -41,24 +23,12 @@
[table 17]
expected: FAIL
[table 18]
expected: FAIL
[table 19]
expected: FAIL
[table 20]
expected: FAIL
[table 22]
expected: FAIL
[table 23]
expected: FAIL
[table 24]
expected: FAIL
[table 26]
expected: FAIL
@ -68,14 +38,5 @@
[table 28]
expected: FAIL
[table 29]
expected: FAIL
[table 30]
expected: FAIL
[table 31]
expected: FAIL
[table 8]
expected: FAIL

View file

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

View file

@ -4,6 +4,3 @@
[table 19]
expected: FAIL
[table 12]
expected: FAIL

View file

@ -1,6 +0,0 @@
[col-span-limits.html]
[col span of 1000 must work]
expected: FAIL
[col span of 1001 must be treated as 1000]
expected: FAIL