summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/SVG
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-11-08 16:58:15 +0000
committerLinus Groh <mail@linusgroh.de>2023-01-05 17:42:31 +0100
commit7d40e3eb0d3f3335bc5de180c435e6b05a0422ab (patch)
tree596f139db8a3d5384cc49eb4d75c5ec954077f12 /Userland/Libraries/LibWeb/SVG
parent13b19529292791e96de35902041d820aac190497 (diff)
downloadserenity-7d40e3eb0d3f3335bc5de180c435e6b05a0422ab.zip
LibWeb: Replace all px Length creation with Length::make_px(CSSPixels)
Diffstat (limited to 'Userland/Libraries/LibWeb/SVG')
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp
index cc49c2dfd2..f435327415 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp
+++ b/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.cpp
@@ -72,8 +72,8 @@ Optional<float> SVGGraphicsElement::stroke_width() const
float viewport_height = 0;
if (auto* svg_svg_element = first_ancestor_of_type<SVGSVGElement>()) {
if (auto* svg_svg_layout_node = svg_svg_element->layout_node()) {
- viewport_width = svg_svg_layout_node->computed_values().width().resolved(*svg_svg_layout_node, { 0, CSS::Length::Type::Px }).to_px(*svg_svg_layout_node);
- viewport_height = svg_svg_layout_node->computed_values().height().resolved(*svg_svg_layout_node, { 0, CSS::Length::Type::Px }).to_px(*svg_svg_layout_node);
+ viewport_width = svg_svg_layout_node->computed_values().width().resolved(*svg_svg_layout_node, CSS::Length::make_px(0)).to_px(*svg_svg_layout_node);
+ viewport_height = svg_svg_layout_node->computed_values().height().resolved(*svg_svg_layout_node, CSS::Length::make_px(0)).to_px(*svg_svg_layout_node);
}
}
auto scaled_viewport_size = CSS::Length::make_px((viewport_width + viewport_height) * 0.5f);