summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp
diff options
context:
space:
mode:
authorSimon Wanner <simon+git@skyrising.xyz>2023-05-30 20:52:44 +0200
committerAndreas Kling <kling@serenityos.org>2023-05-30 21:28:18 +0200
commitb5ba479d6548067922591a965bc873db8af9e779 (patch)
tree1315062762dc0ef9224f7f3bc31a20cda014622f /Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp
parent29088f58ed87545eea7f7bcbac3a3fdb59dfa302 (diff)
downloadserenity-b5ba479d6548067922591a965bc873db8af9e779.zip
LibWeb: Render svg-as-image with 1:1 scaling factor
We're passing the SVGDecodedImageData a size in device pixels, so it's incorrect to apply the host page's device_pixels_per_css_pixels on top of that.
Diffstat (limited to 'Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp')
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp
index 61ae4d0dc0..bf107ba234 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp
+++ b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp
@@ -34,7 +34,7 @@ public:
virtual bool is_connection_open() const override { return false; }
virtual Gfx::Palette palette() const override { return m_host_page.client().palette(); }
virtual DevicePixelRect screen_rect() const override { return {}; }
- virtual double device_pixels_per_css_pixel() const override { return m_host_page.client().device_pixels_per_css_pixel(); }
+ virtual double device_pixels_per_css_pixel() const override { return 1.0; }
virtual CSS::PreferredColorScheme preferred_color_scheme() const override { return m_host_page.client().preferred_color_scheme(); }
virtual void request_file(FileRequest) override { }
virtual void paint(DevicePixelRect const&, Gfx::Bitmap&) override { }