layout: Obey intrinsic min/max block sizes on flex containers (#36973)

Intrinsic sizing keywords weren't working correctly on the min and max
block sizes of a flex container, because we weren't setting the
`CacheableLayoutResult::content_block_size` to the right value. This
also ensures that `align-content` aligns within the final size of the
container.

Note it's not very clear what to do for single-line containers, they are
being discussed in https://github.com/w3c/csswg-drafts/issues/12123

Testing: Adding new WPT tests. There are still some failures, but most
subtests would fail without this change.
Fixes: #36981

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-05-15 00:57:07 -07:00 committed by GitHub
parent 103cbed928
commit cd0dbb9afb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 401 additions and 22 deletions

View file

@ -0,0 +1,12 @@
[flex-container-max-content-002.tentative.html]
[.flex 2]
expected: FAIL
[.flex 3]
expected: FAIL
[.flex 5]
expected: FAIL
[.flex 6]
expected: FAIL

View file

@ -0,0 +1,21 @@
[flex-container-min-content-002.tentative.html]
[.flex 2]
expected: FAIL
[.flex 3]
expected: FAIL
[.flex 5]
expected: FAIL
[.flex 6]
expected: FAIL
[.flex 13]
expected: FAIL
[.flex 14]
expected: FAIL
[.flex 15]
expected: FAIL