layout: Partial support for keyword sizes on preferred cross size (#35682)

This changes `FlexItem::content_cross_size` into `Size<Au>` to preserve
keyword sizes. The calculation of the hypothetical cross size still
ignores them though, that will be addressed in a follow-up.

Also, browsers don't follow the spec and treat a stretch size different
than a stretch alignment: the former stretches to the containing block,
while the latter stretches to the line. This aligns Servo with that
behavior (following the spec would require bigger refactorings), so
`stretches()` is renamed to `stretches_to_line()` for clarity.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-03-04 06:58:46 +01:00 committed by GitHub
parent f3e6e4f04e
commit ff5683680f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 84 additions and 113 deletions

View file

@ -1,3 +0,0 @@
[orthogonal-writing-modes-and-intrinsic-sizing.html]
[.flexbox 2]
expected: FAIL