layout: Properly handle intrinsic min/max block sizes on replaced element (#37457)

This change aligns Servo with both Blink and WebKit in common cases.

When the `aspect-ratio` property is set to a different value than the
natural ratio, then Blink and WebKit disagree, we match Blink.

Gecko doesn't support intrinsic min/max block sizes at all.

Note this patch doesn't fix the intrinsic contributions, they will need
to be addressed in a follow-up patch.

Testing: Covered by WPT
Fixes: #37433

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-06-14 11:24:10 +02:00 committed by GitHub
parent a27f2bb84d
commit f963f2731d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 136 additions and 69 deletions

View file

@ -249947,6 +249947,32 @@
{}
]
],
"replaced-element-047.tentative.html": [
"ec0d6394088436ce3caa0b5d990c2b2fe017f583",
[
null,
[
[
"/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
"replaced-element-048.tentative.html": [
"66057fbdd4df4062e48f81de9417b7cc89fe54f1",
[
null,
[
[
"/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
"replaced-element-dynamic-aspect-ratio.html": [
"d4b83d3673cbfba940baec1c88f3e6630c760eb4",
[

View file

@ -1,24 +0,0 @@
[keyword-sizes-on-replaced-element.html]
[.test 68]
expected: FAIL
[.test 69]
expected: FAIL
[.test 71]
expected: FAIL
[.test 75]
expected: FAIL
[.test 77]
expected: FAIL
[.test 78]
expected: FAIL
[.test 80]
expected: FAIL
[.test 84]
expected: FAIL