mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
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:
parent
319f4f0e38
commit
141413d52e
81 changed files with 156 additions and 260 deletions
|
@ -135,6 +135,9 @@ pub struct HTMLCanvasData {
|
|||
pub struct SVGElementData {
|
||||
/// The SVG's XML source represented as a base64 encoded `data:` url.
|
||||
pub source: Option<Result<ServoUrl, ()>>,
|
||||
pub width: Option<i32>,
|
||||
pub height: Option<i32>,
|
||||
pub ratio: Option<f32>,
|
||||
}
|
||||
|
||||
/// The address of a node known to be valid. These are sent from script to layout.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue