mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
LibWeb: Replace all px Length creation with Length::make_px(CSSPixels)
This commit is contained in:
parent
13b1952929
commit
7d40e3eb0d
5 changed files with 4 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue