LibWeb: Add motion preference

This adds a motion preference to the browser UI similar to the existing
ones for color scheme and contrast.
Both AppKit UI and Qt UI has this new preference.
The auto value is currently the same as NoPreference, follow-ups can
address wiring that up to the actual preference for the OS.
This commit is contained in:
Luke Warlow 2024-06-13 16:15:59 +02:00 committed by Tim Flynn
commit 099b77d60f
Notes: sideshowbarker 2024-07-16 20:08:14 +09:00
25 changed files with 238 additions and 8 deletions

View file

@ -73,6 +73,7 @@ public:
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 CSS::PreferredContrast preferred_contrast() const override { return m_host_page->client().preferred_contrast(); }
virtual CSS::PreferredMotion preferred_motion() const override { return m_host_page->client().preferred_motion(); }
virtual void request_file(FileRequest) override { }
virtual void paint_next_frame() override { }
virtual void paint(DevicePixelRect const&, Gfx::Bitmap&, Web::PaintOptions = {}) override { }