layout: Improve sizing for inline SVG (#38603)

The metadata provided by usvg has unreliable sizes. Ignore it, and rely
on the `width`, `height` and `viewBox` attributes instead.

Note that inline SVG with a natural aspect ratio but no natural sizes
should stretch to the containing block. This is left for a follow-up.

Bumps Stylo to https://github.com/servo/stylo/pull/229

Testing: Improves several WPT.

---------

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Oriol Brufau 2025-08-12 05:45:15 -07:00 committed by GitHub
parent 319f4f0e38
commit 141413d52e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
81 changed files with 156 additions and 260 deletions

View file

@ -10,9 +10,3 @@
[.test 8]
expected: FAIL
[.test 3]
expected: FAIL
[.test 7]
expected: FAIL

View file

@ -0,0 +1,2 @@
[replaced-aspect-ratio-stretch-fit-002.html]
expected: FAIL

View file

@ -1,30 +1,6 @@
[svg-intrinsic-size-001.html]
[svg 1: undefined]
expected: FAIL
[svg 2: undefined]
expected: FAIL
[svg 3: undefined]
expected: FAIL
[svg 4: undefined]
expected: FAIL
[svg 5: undefined]
expected: FAIL
[svg 1]
expected: FAIL
[svg 2]
expected: FAIL
[svg 3]
expected: FAIL
[svg 4]
expected: FAIL
[svg 5]
expected: FAIL

View file

@ -1,30 +1,6 @@
[svg-intrinsic-size-002.html]
[svg 1: undefined]
expected: FAIL
[svg 2: undefined]
expected: FAIL
[svg 3: undefined]
expected: FAIL
[svg 4: undefined]
expected: FAIL
[svg 5: undefined]
expected: FAIL
[svg 1]
expected: FAIL
[svg 2]
expected: FAIL
[svg 3]
expected: FAIL
[svg 4]
expected: FAIL
[svg 5]
expected: FAIL

View file

@ -1,30 +1,6 @@
[svg-intrinsic-size-003.html]
[svg 1: undefined]
expected: FAIL
[svg 2: undefined]
expected: FAIL
[svg 3: undefined]
expected: FAIL
[svg 4: undefined]
expected: FAIL
[svg 5: undefined]
expected: FAIL
[svg 1]
expected: FAIL
[svg 2]
expected: FAIL
[svg 3]
expected: FAIL
[svg 4]
expected: FAIL
[svg 5]
expected: FAIL

View file

@ -1,24 +1,6 @@
[svg-intrinsic-size-004.html]
[svg 1: undefined]
expected: FAIL
[svg 2: undefined]
expected: FAIL
[svg 3: undefined]
expected: FAIL
[svg 4: undefined]
expected: FAIL
[svg 1]
expected: FAIL
[svg 2]
expected: FAIL
[svg 3]
expected: FAIL
[svg 4]
[svg 5]
expected: FAIL

View file

@ -1,2 +0,0 @@
[svg-no-ar-max-height-min-content.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[svg-no-ar-min-height-min-content.html]
expected: FAIL