layout: Ignore indefinite stretch on min and max sizing properties (#35630)

We were always treating an indefinite `stretch` as the automatic size.
This instead treats it as `0px` on min sizing properties, and as `none`
on max sizing properties, aligning with Blink and this recent CSSWG
resolution: https://github.com/w3c/csswg-drafts/issues/11006

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-02-24 14:51:08 +01:00 committed by GitHub
parent e74bb8de15
commit 41c2422a66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 266 additions and 145 deletions

View file

@ -536,7 +536,7 @@ impl ReplacedContents {
Direction::Inline,
automatic_size.inline,
Au::zero(),
inline_stretch_size,
Some(inline_stretch_size),
get_inline_content_size,
false, /* is_table */
);
@ -565,7 +565,7 @@ impl ReplacedContents {
Direction::Block,
automatic_size.block,
Au::zero(),
block_stretch_size.unwrap_or_else(|| block_content_size.max_content),
block_stretch_size,
|| *block_content_size,
false, /* is_table */
);