summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Painting/SVGGeometryPaintable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/SVGGeometryPaintable.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Painting/SVGGeometryPaintable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/SVGGeometryPaintable.cpp b/Userland/Libraries/LibWeb/Painting/SVGGeometryPaintable.cpp
index 09ac1270a5..7fc3076b39 100644
--- a/Userland/Libraries/LibWeb/Painting/SVGGeometryPaintable.cpp
+++ b/Userland/Libraries/LibWeb/Painting/SVGGeometryPaintable.cpp
@@ -36,7 +36,7 @@ Optional<HitTestResult> SVGGeometryPaintable::hit_test(CSSPixelPoint position, H
if (auto transform = layout_box().layout_transform(); transform.has_value()) {
auto transformed_bounding_box = transform->map_to_quad(
const_cast<SVG::SVGGeometryElement&>(geometry_element).get_path().bounding_box());
- if (!transformed_bounding_box.contains(position.to_type<float>()))
+ if (!transformed_bounding_box.contains(position.to_type<double>().to_type<float>()))
return {};
}
return result;
@@ -92,7 +92,7 @@ void SVGGeometryPaintable::paint(PaintContext& context, PaintPhase phase) const
auto svg_viewport = [&] {
if (maybe_view_box.has_value())
return Gfx::FloatRect { maybe_view_box->min_x, maybe_view_box->min_y, maybe_view_box->width, maybe_view_box->height };
- return Gfx::FloatRect { { 0, 0 }, svg_context.svg_element_size().to_type<float>() };
+ return Gfx::FloatRect { { 0, 0 }, svg_context.svg_element_size().to_type<double>().to_type<float>() };
}();
SVG::SVGPaintContext paint_context {