1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 06:37:35 +00:00

LibWeb+LibWebView+WebContent: Add support for <input type="color">

This commit introduces 3 things:
- Support for the color type in HTMLInputElement itself
- A mechanism for handling non event loop blocking dialogs in Page
- The associated plumbing up to ViewImplementation

Frontends may add support for the color picker with the
ViewImplementation.on_request_color_picker function
This commit is contained in:
circl 2023-09-04 11:32:40 +02:00 committed by Sam Atkins
parent 759ad905de
commit 2995a2e212
14 changed files with 110 additions and 4 deletions

View file

@ -48,6 +48,7 @@ public:
void alert_closed();
void confirm_closed(bool accepted);
void prompt_closed(Optional<String> response);
void color_picker_closed(Optional<Color> picked_color);
Web::WebIDL::ExceptionOr<void> toggle_media_play_state();
void toggle_media_mute_state();
@ -113,6 +114,7 @@ private:
virtual void page_did_request_activate_tab() override;
virtual void page_did_close_browsing_context(Web::HTML::BrowsingContext const&) override;
virtual void request_file(Web::FileRequest) override;
virtual void page_did_request_color_picker(Color current_color) override;
virtual void page_did_finish_text_test() override;
explicit PageHost(ConnectionFromClient&);