Implement the aspect-ratio property for replaced elements (#32800)

* Add WPT tests for box-sizing with aspect-ratio

Signed-off-by: valadaptive <valadaptive@protonmail.com>

* Implement `aspect-ratio` for replaced elements

There are two regressions because we don't implement `object-fit`, and
one because we don't properly represent non-available <img>s with `alt`
attributes.

Signed-off-by: valadaptive <valadaptive@protonmail.com>

---------

Signed-off-by: valadaptive <valadaptive@protonmail.com>
This commit is contained in:
valadaptive 2024-07-24 07:40:23 -04:00 committed by GitHub
parent e425ad0cb7
commit 60e65c175d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 314 additions and 62 deletions

View file

@ -0,0 +1,12 @@
[box-sizing-dimensions.html]
[.item 5]
expected: FAIL
[.item 6]
expected: FAIL
[.item 7]
expected: FAIL
[.item 8]
expected: FAIL

View file

@ -0,0 +1,18 @@
[box-sizing-squashed.html]
[.item 10]
expected: FAIL
[.item 12]
expected: FAIL
[.item 13]
expected: FAIL
[.item 14]
expected: FAIL
[.item 15]
expected: FAIL
[.item 16]
expected: FAIL

View file

@ -1,2 +0,0 @@
[flex-aspect-ratio-015.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[flex-aspect-ratio-016.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[grid-aspect-ratio-003.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[grid-aspect-ratio-004.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[replaced-element-001.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[replaced-element-002.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[replaced-element-003.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[replaced-element-009.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[replaced-element-012.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[replaced-element-024.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[replaced-element-025.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[replaced-element-026.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[replaced-element-027.html]
expected: FAIL

View file

@ -0,0 +1,3 @@
[replaced-element-028.html]
[CSS aspect-ratio: img]
expected: FAIL

View file

@ -1,2 +0,0 @@
[replaced-element-031.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[replaced-element-032.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[replaced-element-033.html]
expected: FAIL

View file

@ -1,6 +0,0 @@
[replaced-element-036.html]
[display:block img should be 200px high]
expected: FAIL
[display:inline-block img should be 200px high]
expected: FAIL

View file

@ -1,2 +0,0 @@
[replaced-element-dynamic-aspect-ratio.html]
expected: FAIL