layout: Let getComputedStyle resolve auto min size as 0px when needed (#36430)

The initial value of `min-width` and `min-height` was 0px in CSS2.
However, CSS3 changed it to `auto`, so for backwards compatibility,
`getComputedStyle` needs to resolve it to 0px in a bunch of cases.

Testing: covered by WPT

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-04-14 03:31:48 -07:00 committed by GitHub
parent fbe1f0ef6d
commit f1417c4e75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 133 additions and 138 deletions

View file

@ -1,7 +0,0 @@
[flexbox_computedstyle_min-auto-size.html]
[Computed min-width/min-height of specified auto inside display:none which would otherwise have been a flex item.]
expected: FAIL
[Computed min-width/min-height of specified auto with display:none which would otherwise have been a flex item.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[grid-item-min-auto-size-001.html]
[Computed min-width/min-height of specified auto inside display:none which would otherwise have been a grid item.]
expected: FAIL
[Computed min-width/min-height of specified auto with display:none which would otherwise have been a grid item.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[inheritance.html]
[Property min-block-size has initial value 0px]
expected: FAIL
[Property min-inline-size has initial value 0px]
expected: FAIL

View file

@ -1,3 +0,0 @@
[min-block-size-computed.html]
[Property min-block-size value 'auto']
expected: FAIL

View file

@ -1,3 +0,0 @@
[min-inline-size-computed.html]
[Property min-inline-size value 'auto']
expected: FAIL

View file

@ -1,21 +0,0 @@
[getComputedStyle-resolved-min-size-auto.html]
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="block-box"]
expected: FAIL
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="inline-box"]
expected: FAIL
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="display-none"]
expected: FAIL
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="display-none-valid-aspect-ratio"]
expected: FAIL
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="display-none-subtree-valid-aspect-ratio"]
expected: FAIL
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="display-none-subtree-flex-item"]
expected: FAIL
[Resolved value of min-width & min-height 'auto' keyword behaves as expected on element with id="display-none-subtree-grid-item"]
expected: FAIL