Don't transfer indefinite height: stretch to inline axis (#34557)

Consider this testcase:
```html
<canvas style="aspect-ratio: 1; height: stretch; background: cyan"
        width="200" height="100"></canvas>
```

To compute the intrinsic inline sizes we were treating `height: stretch`
as the natural height (100px) and then transferring that to the inline
axis through the preferred aspect ratio. So the element was 100px wide.

However, an indefinite `stretch` should be treated as an automatic size,
which wouldn't be transferred to the inline axis.

The fix actually makes the code slightly simpler.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2024-12-10 12:12:28 +01:00 committed by GitHub
parent 2b8a8f7498
commit e10e989abb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 26 additions and 15 deletions

View file

@ -575775,7 +575775,7 @@
]
],
"keyword-sizes-on-replaced-element.html": [
"e26c1b7d6ac38858fd7a941a690ea01e6005c38c",
"8863ef491570c4d194bbb4b1d03a6e12367d4ff3",
[
null,
{}