layout: Add support for table rows, columns, rowgroups and colgroups (#31341)

This adds support for table rows, columns, rowgroups and colgroups.
There are few additions here:

1. The createion of fragments, which allows script queries and hit
   testing to work properly. These fragments are empty as all cells are
   still direct descendants of the table fragment.
2. Properly handling size information from tracks and track groups as
   well as frustrating rules about reordering rowgroups.
3. Painting a background seemlessly across track groups and groups. This
   is a thing that isn't done in legacy layout (nor WebKit)!

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2024-02-20 14:22:02 +01:00 committed by GitHub
parent 74c07db56c
commit 02ae1f448e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 4274 additions and 21000 deletions

View file

@ -3432,9 +3432,6 @@
[HTMLAreaElement interface: attribute origin]
expected: FAIL
[HTMLTableColElement interface: document.createElement("colgroup") must inherit property "span" with the proper type]
expected: FAIL
[HTMLTableSectionElement interface: attribute chOff]
expected: FAIL
@ -3831,9 +3828,6 @@
[HTMLAreaElement interface: attribute hostname]
expected: FAIL
[HTMLTableColElement interface: attribute span]
expected: FAIL
[HTMLTableElement interface: document.createElement("table") must inherit property "border" with the proper type]
expected: FAIL
@ -4221,9 +4215,6 @@
[HTMLFrameElement interface: attribute scrolling]
expected: FAIL
[HTMLTableColElement interface: document.createElement("col") must inherit property "span" with the proper type]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "accessKeyLabel" with the proper type]
expected: FAIL

View file

@ -1829,30 +1829,6 @@
[colgroup.tabIndex: IDL set to -2147483648]
expected: FAIL
[colgroup.span: typeof IDL attribute]
expected: FAIL
[colgroup.span: IDL get with DOM attribute unset]
expected: FAIL
[colgroup.span: setAttribute() to -2147483649]
expected: FAIL
[colgroup.span: setAttribute() to -2147483648]
expected: FAIL
[colgroup.span: setAttribute() to -36]
expected: FAIL
[colgroup.span: setAttribute() to -1]
expected: FAIL
[colgroup.span: setAttribute() to 0]
expected: FAIL
[colgroup.span: setAttribute() to 1]
expected: FAIL
[colgroup.span: setAttribute() to 2147483647]
expected: FAIL
@ -1865,171 +1841,18 @@
[colgroup.span: setAttribute() to 4294967296]
expected: FAIL
[colgroup.span: setAttribute() to ""]
expected: FAIL
[colgroup.span: setAttribute() to "-1"]
expected: FAIL
[colgroup.span: setAttribute() to "-0"]
expected: FAIL
[colgroup.span: setAttribute() to "0"]
expected: FAIL
[colgroup.span: setAttribute() to "1"]
expected: FAIL
[colgroup.span: setAttribute() to "\\t7"]
expected: FAIL
[colgroup.span: setAttribute() to "\\v7"]
expected: FAIL
[colgroup.span: setAttribute() to "\\f7"]
expected: FAIL
[colgroup.span: setAttribute() to " 7"]
expected: FAIL
[colgroup.span: setAttribute() to " 7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "\\n7"]
expected: FAIL
[colgroup.span: setAttribute() to "\\r7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to " 7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to "7"]
expected: FAIL
[colgroup.span: setAttribute() to " 7"]
expected: FAIL
[colgroup.span: setAttribute() to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo "]
expected: FAIL
[colgroup.span: setAttribute() to undefined]
expected: FAIL
[colgroup.span: setAttribute() to 1.5]
expected: FAIL
[colgroup.span: setAttribute() to "5%"]
expected: FAIL
[colgroup.span: setAttribute() to "+100"]
expected: FAIL
[colgroup.span: setAttribute() to ".5"]
expected: FAIL
[colgroup.span: setAttribute() to true]
expected: FAIL
[colgroup.span: setAttribute() to false]
expected: FAIL
[colgroup.span: setAttribute() to object "[object Object\]"]
expected: FAIL
[colgroup.span: setAttribute() to NaN]
expected: FAIL
[colgroup.span: setAttribute() to Infinity]
expected: FAIL
[colgroup.span: setAttribute() to -Infinity]
expected: FAIL
[colgroup.span: setAttribute() to "\\0"]
expected: FAIL
[colgroup.span: setAttribute() to object "2"]
expected: FAIL
[colgroup.span: setAttribute() to object "3"]
expected: FAIL
[colgroup.span: setAttribute() to 1000]
expected: FAIL
[colgroup.span: setAttribute() to 1001]
expected: FAIL
[colgroup.span: IDL set to 0]
expected: FAIL
[colgroup.span: IDL set to 1]
expected: FAIL
[colgroup.span: IDL set to 257]
expected: FAIL
[colgroup.span: IDL set to 2147483647]
expected: FAIL
[colgroup.span: IDL set to "-0"]
expected: FAIL
[colgroup.span: IDL set to 2147483648]
expected: FAIL
[colgroup.span: IDL set to 4294967295]
expected: FAIL
[colgroup.span: IDL set to 1000]
expected: FAIL
[colgroup.span: IDL set to 1001]
expected: FAIL
@ -2909,30 +2732,6 @@
[col.tabIndex: IDL set to -2147483648]
expected: FAIL
[col.span: typeof IDL attribute]
expected: FAIL
[col.span: IDL get with DOM attribute unset]
expected: FAIL
[col.span: setAttribute() to -2147483649]
expected: FAIL
[col.span: setAttribute() to -2147483648]
expected: FAIL
[col.span: setAttribute() to -36]
expected: FAIL
[col.span: setAttribute() to -1]
expected: FAIL
[col.span: setAttribute() to 0]
expected: FAIL
[col.span: setAttribute() to 1]
expected: FAIL
[col.span: setAttribute() to 2147483647]
expected: FAIL
@ -2945,171 +2744,18 @@
[col.span: setAttribute() to 4294967296]
expected: FAIL
[col.span: setAttribute() to ""]
expected: FAIL
[col.span: setAttribute() to "-1"]
expected: FAIL
[col.span: setAttribute() to "-0"]
expected: FAIL
[col.span: setAttribute() to "0"]
expected: FAIL
[col.span: setAttribute() to "1"]
expected: FAIL
[col.span: setAttribute() to "\\t7"]
expected: FAIL
[col.span: setAttribute() to "\\v7"]
expected: FAIL
[col.span: setAttribute() to "\\f7"]
expected: FAIL
[col.span: setAttribute() to " 7"]
expected: FAIL
[col.span: setAttribute() to " 7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "\\n7"]
expected: FAIL
[col.span: setAttribute() to "\\r7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to " 7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to "7"]
expected: FAIL
[col.span: setAttribute() to " 7"]
expected: FAIL
[col.span: setAttribute() to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo "]
expected: FAIL
[col.span: setAttribute() to undefined]
expected: FAIL
[col.span: setAttribute() to 1.5]
expected: FAIL
[col.span: setAttribute() to "5%"]
expected: FAIL
[col.span: setAttribute() to "+100"]
expected: FAIL
[col.span: setAttribute() to ".5"]
expected: FAIL
[col.span: setAttribute() to true]
expected: FAIL
[col.span: setAttribute() to false]
expected: FAIL
[col.span: setAttribute() to object "[object Object\]"]
expected: FAIL
[col.span: setAttribute() to NaN]
expected: FAIL
[col.span: setAttribute() to Infinity]
expected: FAIL
[col.span: setAttribute() to -Infinity]
expected: FAIL
[col.span: setAttribute() to "\\0"]
expected: FAIL
[col.span: setAttribute() to object "2"]
expected: FAIL
[col.span: setAttribute() to object "3"]
expected: FAIL
[col.span: setAttribute() to 1000]
expected: FAIL
[col.span: setAttribute() to 1001]
expected: FAIL
[col.span: IDL set to 0]
expected: FAIL
[col.span: IDL set to 1]
expected: FAIL
[col.span: IDL set to 257]
expected: FAIL
[col.span: IDL set to 2147483647]
expected: FAIL
[col.span: IDL set to "-0"]
expected: FAIL
[col.span: IDL set to 2147483648]
expected: FAIL
[col.span: IDL set to 4294967295]
expected: FAIL
[col.span: IDL set to 1000]
expected: FAIL
[col.span: IDL set to 1001]
expected: FAIL
@ -7037,9 +6683,6 @@
[td.tabIndex: IDL set to -2147483648]
expected: FAIL
[td.colSpan: setAttribute() to 0]
expected: FAIL
[td.colSpan: setAttribute() to 2147483647]
expected: FAIL
@ -7052,12 +6695,6 @@
[td.colSpan: setAttribute() to 4294967296]
expected: FAIL
[td.colSpan: setAttribute() to "-0"]
expected: FAIL
[td.colSpan: setAttribute() to "0"]
expected: FAIL
[td.colSpan: setAttribute() to 1001]
expected: FAIL
@ -8660,9 +8297,6 @@
[th.tabIndex: IDL set to -2147483648]
expected: FAIL
[th.colSpan: setAttribute() to 0]
expected: FAIL
[th.colSpan: setAttribute() to 2147483647]
expected: FAIL
@ -8675,12 +8309,6 @@
[th.colSpan: setAttribute() to 4294967296]
expected: FAIL
[th.colSpan: setAttribute() to "-0"]
expected: FAIL
[th.colSpan: setAttribute() to "0"]
expected: FAIL
[th.colSpan: setAttribute() to 1001]
expected: FAIL
@ -9995,60 +9623,12 @@
[colgroup.tabIndex: setAttribute() to object "3"]
expected: FAIL
[colgroup.span: setAttribute() to "-"]
expected: FAIL
[colgroup.span: setAttribute() to "+"]
expected: FAIL
[colgroup.span: setAttribute() to "\\t\\v7"]
expected: FAIL
[colgroup.span: setAttribute() to "\\n\\v7"]
expected: FAIL
[colgroup.span: setAttribute() to "\\f\\v7"]
expected: FAIL
[colgroup.span: setAttribute() to "\\r\\v7"]
expected: FAIL
[colgroup.span: setAttribute() to " \\v7"]
expected: FAIL
[colgroup.span: setAttribute() to "7\\v"]
expected: FAIL
[col.tabIndex: setAttribute() to "7\\v"]
expected: FAIL
[col.tabIndex: setAttribute() to object "3"]
expected: FAIL
[col.span: setAttribute() to "-"]
expected: FAIL
[col.span: setAttribute() to "+"]
expected: FAIL
[col.span: setAttribute() to "\\t\\v7"]
expected: FAIL
[col.span: setAttribute() to "\\n\\v7"]
expected: FAIL
[col.span: setAttribute() to "\\f\\v7"]
expected: FAIL
[col.span: setAttribute() to "\\r\\v7"]
expected: FAIL
[col.span: setAttribute() to " \\v7"]
expected: FAIL
[col.span: setAttribute() to "7\\v"]
expected: FAIL
[tbody.tabIndex: setAttribute() to "7\\v"]
expected: FAIL