layout: Improve layout of table captions (#32695)

- Instead of treating captions as a `BlockFormattingContext`, treat it as
  a `NonReplacedFormattingContext`, which allows reusing flow layout for
  captions -- fixing some issues with sizing.
- Pass in the proper size of the containing block when laying out,
  fixing margin calculation.
- Follow the unspecified rules about how various size properties on
  captions affect their size.
- Improve linebreaking around atomics, which is tested by
  caption-related tests. This fixes intrinsic size calculation regarding
  soft wrap opportunities around atomic and also makes the code making
  these actual soft wrap opportunities a bit better.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Martin Robinson 2024-07-08 14:58:38 +02:00 committed by GitHub
parent 2888193cfe
commit 89944bd330
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
52 changed files with 225 additions and 454 deletions

View file

@ -1,15 +1,3 @@
[caption.html]
[table 1]
expected: FAIL
[table 2]
expected: FAIL
[table 3]
expected: FAIL
[table 12]
expected: FAIL
[table 13]
expected: FAIL

View file

@ -1,28 +1,10 @@
[column-widths.html]
[table 1]
expected: FAIL
[table 3]
expected: FAIL
[table 5]
expected: FAIL
[table 8]
expected: FAIL
[table 11]
expected: FAIL
[table 13]
expected: FAIL
[table 14]
expected: FAIL
[table 17]
expected: FAIL
[table 19]
expected: FAIL
@ -49,6 +31,3 @@
[table 33]
expected: FAIL
[table 4]
expected: FAIL

View file

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

View file

@ -2,9 +2,6 @@
[table 1]
expected: FAIL
[table 2]
expected: FAIL
[table 4]
expected: FAIL

View file

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

View file

@ -1,43 +1,13 @@
[table-width-redistribution.html]
[table 1]
expected: FAIL
[table 2]
expected: FAIL
[table 3]
expected: FAIL
[table 4]
expected: FAIL
[table 5]
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
[table 15]
expected: FAIL
[table 20]
expected: FAIL

View file

@ -1,3 +0,0 @@
[computing-table-width-0.html]
[Width is 100px due to 100px content size of caption]
expected: FAIL