layout: Let align-content: stretch fall back to unsafe flex-start (#37708)

This aligns Servo with other browsers, and adopts this CSSWG resolution:
https://github.com/w3c/csswg-drafts/issues/11641#issuecomment-3005385155

Testing: adding new WPT test, and some expectation changes for existing
tests.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-06-26 15:53:28 +02:00 committed by GitHub
parent d4c0d2ecbb
commit a9dc2ac83a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 47 additions and 3 deletions

View file

@ -802,7 +802,7 @@ impl FlexContainer {
if fallback_is_needed {
(resolved_align_content, is_safe) = match resolved_align_content {
AlignFlags::STRETCH => (AlignFlags::FLEX_START, true),
AlignFlags::STRETCH => (AlignFlags::FLEX_START, false),
AlignFlags::SPACE_BETWEEN => (AlignFlags::FLEX_START, true),
AlignFlags::SPACE_AROUND => (AlignFlags::CENTER, true),
AlignFlags::SPACE_EVENLY => (AlignFlags::CENTER, true),