mirror of
https://github.com/servo/servo.git
synced 2025-08-13 09:25:32 +01:00
layout: Never stretch indefinite intrinsic keywords other than auto
(#34672)
Consider: ```html <div style="position: relative; width: 50px; height: 50px; border: solid; margin: 5px"> <div style="position: absolute; top: 0; bottom: 0; height: max-content"> <canvas width="25" height="25" style="background: cyan; height: 100%"></canvas> </div> </div> ``` In order to determine the inline min/max-content sizes, we need a tentative block size as the input, which only takes extrinsic values into account. In this case `height: max-content` is intrinsic, so we were treating it as `height: initial`, which would behave as a definite `height: stretch`. Therefore, the canvas was able to resolve its percentage. However, it seems weird to treat an explicitly intrinsic keyword in an extrinsic way, and Blink doesn't do it. So now we treat the tentative block size as indefinite, therefore the percentage behaves as auto. This adds a new test, we were previously failing 6 subtests, now only 3. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
017b12a627
commit
ab270f3d52
5 changed files with 329 additions and 6 deletions
9
tests/wpt/meta/css/css-sizing/keyword-sizes-on-abspos.html.ini
vendored
Normal file
9
tests/wpt/meta/css/css-sizing/keyword-sizes-on-abspos.html.ini
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
[keyword-sizes-on-abspos.html]
|
||||
[.test 17]
|
||||
expected: FAIL
|
||||
|
||||
[.test 22]
|
||||
expected: FAIL
|
||||
|
||||
[.test 27]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue