1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

LibWeb: Use viewbox attribute in SVG symbol element

Previously when a viewBox was passed to a SVG symbol element it would
not be taken into account when drawing the SVG.
This commit is contained in:
Tom 2023-07-31 18:37:44 +02:00 committed by Andreas Kling
parent 9f73fc87a8
commit e61fdd1dc6
9 changed files with 67 additions and 4 deletions

View file

@ -159,7 +159,7 @@ void SVGFormattingContext::run(Box const& box, LayoutMode layout_mode, Available
auto path_transform = dom_node.get_transform();
double viewbox_scale = 1;
auto maybe_view_box = svg_svg_element.view_box();
auto maybe_view_box = dom_node.view_box();
if (maybe_view_box.has_value()) {
// FIXME: This should allow just one of width or height to be specified.
// E.g. We should be able to layout <svg width="100%"> where height is unspecified/auto.