mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibWeb: Make CSSPixels and Length use 64-bit (double) floating point
This fixes a plethora of rounding problems on many websites. In the future, we may want to replace this with fixed-point arithmetic (bug #18566) for performance (and consistency with other engines), but in the meantime this makes the web look a bit better. :^) There's a lot more things that could be converted to doubles, which would reduce the amount of casting necessary in this patch. We can do that incrementally, however.
This commit is contained in:
@@ -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 float 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 m_host_page.client().device_pixels_per_css_pixel(); }
|
||||
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 { }
|
||||
|
||||
Reference in New Issue
Block a user