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
parent 0b22aae518
commit 099b77d60f
Notes: sideshowbarker 2024-07-16 20:08:14 +09:00
25 changed files with 238 additions and 8 deletions

View file

@ -162,6 +162,11 @@ void ViewImplementation::set_preferred_contrast(Web::CSS::PreferredContrast cont
client().async_set_preferred_contrast(page_id(), contrast);
}
void ViewImplementation::set_preferred_motion(Web::CSS::PreferredMotion motion)
{
client().async_set_preferred_motion(page_id(), motion);
}
ByteString ViewImplementation::selected_text()
{
return client().get_selected_text(page_id());