LibWeb+LibWebView+WebContent: Introduce a basic about:settings page

This adds a basic settings page to manage persistent Ladybird settings.
As a first pass, this exposes settings for the new tab page URL and the
default search engine.

The way the search engine option works is that once search is enabled,
the user must choose their default search engine; we do not apply any
default automatically. Search remains disabled until this is done.

There are a couple of improvements that we should make here:

* Settings changes are not broadcasted to all open about:settings pages.
  So if two instances are open, and the user changes the search engine
  in one instance, the other instance will have a stale UI.

* Adding an IPC per setting is going to get annoying. It would be nice
  if we can come up with a smaller set of IPCs to send only the relevant
  changed settings.
This commit is contained in:
Timothy Flynn 2025-03-21 09:18:02 -04:00 committed by Alexander Kalenik
commit b169a98495
Notes: github-actions[bot] 2025-03-22 16:28:49 +00:00
16 changed files with 475 additions and 2 deletions

View file

@ -130,6 +130,11 @@ private:
virtual void did_allocate_backing_stores(u64 page_id, i32 front_bitmap_id, Gfx::ShareableBitmap, i32 back_bitmap_id, Gfx::ShareableBitmap) override;
virtual Messages::WebContentClient::RequestWorkerAgentResponse request_worker_agent(u64 page_id) override;
virtual void update_process_statistics(u64 page_id) override;
virtual void request_current_settings(u64 page_id) override;
virtual void restore_default_settings(u64 page_id) override;
virtual void set_new_tab_page_url(u64 page_id, URL::URL new_tab_page_url) override;
virtual void request_available_search_engines(u64 page_id) override;
virtual void set_search_engine(u64 page_id, Optional<String> search_engine) override;
Optional<ViewImplementation&> view_for_page_id(u64, SourceLocation = SourceLocation::current());