mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Fix sizing of replaced elements with min/max sizes (#32777)
If a (min/max)-(height/width) property is set, we still need to respect the intrinsic ratio of the element if it exists. The previous code was simply clamping the element size after doing the sizing calculations once, but this leads to an incorrect aspect ratio. Signed-off-by: valadaptive <valadaptive@protonmail.com>
This commit is contained in:
parent
1b1f79305e
commit
f6c9714286
8 changed files with 232 additions and 200 deletions
|
@ -20,12 +20,6 @@
|
|||
[Computed style test: canvas with {"width":"10%","height":"20"}]
|
||||
expected: FAIL
|
||||
|
||||
[Canvas width and height attributes are used as the surface size with contain:size]
|
||||
expected: FAIL
|
||||
|
||||
[Canvas width and height attributes are used as the surface size]
|
||||
expected: FAIL
|
||||
|
||||
[Computed style test: canvas with {"width":null,"height":null}]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -109,12 +109,3 @@
|
|||
|
||||
[Computed style test: input with {"type":"submit","width":"10%","height":"20"}]
|
||||
expected: FAIL
|
||||
|
||||
[Loaded images test: <img> without width height attributes]
|
||||
expected: FAIL
|
||||
|
||||
[Loaded images test: <img> with width and height attributes, but conflicting to the original aspect ratio]
|
||||
expected: FAIL
|
||||
|
||||
[Loaded images test: <img> with width and height attributes, but not equal to the original aspect ratio]
|
||||
expected: FAIL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue