layout: Add support for table captions (#32657)

This adds initial support for table captions. To do this, the idea of
the table wrapper becomes a bit more concrete. Even so, the wrapper is
still reponsible for allocating space for the grid's border and padding,
as those properties are specified on the wrapper and not grid in CSS.

In order to account for this weirdness of HTML/CSS captions and grid are
now laid out and placed with a negative offset in the table wrapper
content rect.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2024-07-03 20:24:19 +02:00 committed by GitHub
parent f8e4ae6040
commit 959ffad99a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
76 changed files with 551 additions and 322 deletions

View file

@ -1,6 +0,0 @@
[caption-side-1.html]
[Caption-side inherits and reorder captions properly]
expected: FAIL
[Multiple captions can be rendered]
expected: FAIL

View file

@ -2,12 +2,6 @@
[Property border-spacing has initial value 0px 0px]
expected: FAIL
[Property caption-side has initial value top]
expected: FAIL
[Property caption-side inherits]
expected: FAIL
[Property table-layout has initial value auto]
expected: FAIL

View file

@ -1,6 +0,0 @@
[caption-side-computed.html]
[Property caption-side value 'top']
expected: FAIL
[Property caption-side value 'bottom']
expected: FAIL

View file

@ -1,6 +0,0 @@
[caption-side-valid.html]
[e.style['caption-side'\] = "top" should set the property value]
expected: FAIL
[e.style['caption-side'\] = "bottom" should set the property value]
expected: FAIL

View file

@ -31,3 +31,12 @@
[Replaced elements outside a table cannot be table-row-group and are considered inline -- input=button elements]
expected: FAIL
[Replaced elements outside a table cannot be table-caption and are considered inline -- input=text elements]
expected: FAIL
[Replaced elements outside a table cannot be table-caption and are considered inline -- input=button elements]
expected: FAIL
[Replaced elements outside a table cannot be table-caption and are considered inline -- input=file elements]
expected: FAIL

View file

@ -8,9 +8,6 @@
[2.2. An anonymous table-row box must be generated around each sequence of consecutive children of a table-row-grouping box which are not table-row boxes. (2/3)]
expected: FAIL
[3.2. An anonymous table or inline-table box must be generated around each sequence of consecutive proper table child box which are misparented]
expected: FAIL
[2.2. An anonymous table-row box must be generated around each sequence of consecutive children of a table-row-grouping box which are not table-row boxes. (3/3)]
expected: FAIL

View file

@ -8,24 +8,6 @@
[table 3]
expected: FAIL
[table 7]
expected: FAIL
[table 8]
expected: FAIL
[table 9]
expected: FAIL
[table 10]
expected: FAIL
[table 4]
expected: FAIL
[table 5]
expected: FAIL
[table 12]
expected: FAIL

View file

@ -5,9 +5,6 @@
[table 5]
expected: FAIL
[table 16]
expected: FAIL
[table 1]
expected: FAIL