1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

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.
This commit is contained in:
Simon Wanner 2023-05-30 20:52:44 +02:00 committed by Andreas Kling
parent 29088f58ed
commit b5ba479d65

View file

@ -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 { }