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

@ -1,2 +0,0 @@
[float-replaced-width-007.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[block-replaced-width-002.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[inline-block-replaced-height-009.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[inline-block-replaced-width-002.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[inline-block-replaced-width-007.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[inline-block-replaced-width-008.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[inline-replaced-height-009.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[inline-replaced-width-002.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[inline-replaced-width-008.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[inline-replaced-width-009.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[absolute-replaced-width-002.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[absolute-replaced-width-003a.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[absolute-replaced-width-003b.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[absolute-replaced-width-003c.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[absolute-replaced-width-009.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[absolute-replaced-width-023.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[absolute-replaced-width-030.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[absolute-replaced-width-037.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[absolute-replaced-width-051.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[absolute-replaced-width-065.xht]
expected: FAIL