From b5ba479d6548067922591a965bc873db8af9e779 Mon Sep 17 00:00:00 2001 From: Simon Wanner Date: Tue, 30 May 2023 20:52:44 +0200 Subject: 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. --- Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp') 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 { } -- cgit v1.2.3