1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:17:45 +00:00

Ladybird: Implement updated alert/confirm/prompt IPC methods

WebContent now needs to interact with these dialogs asynchronously. This
updates WebContentView to hold a pointer to whatever dialog is open, and
implements the methods to interact with that dialog.
This commit is contained in:
Timothy Flynn 2022-11-16 09:06:47 -05:00 committed by Andrew Kaster
parent fad3fbfe26
commit 9a5f9c101c
2 changed files with 49 additions and 12 deletions

View file

@ -132,8 +132,11 @@ public:
virtual void notify_server_did_request_link_context_menu(Badge<WebContentClient>, Gfx::IntPoint const&, const AK::URL&, String const& target, unsigned modifiers) override;
virtual void notify_server_did_request_image_context_menu(Badge<WebContentClient>, Gfx::IntPoint const&, const AK::URL&, String const& target, unsigned modifiers, Gfx::ShareableBitmap const&) override;
virtual void notify_server_did_request_alert(Badge<WebContentClient>, String const& message) override;
virtual bool notify_server_did_request_confirm(Badge<WebContentClient>, String const& message) override;
virtual String notify_server_did_request_prompt(Badge<WebContentClient>, String const& message, String const& default_) override;
virtual void notify_server_did_request_confirm(Badge<WebContentClient>, String const& message) override;
virtual void notify_server_did_request_prompt(Badge<WebContentClient>, String const& message, String const& default_) override;
virtual void notify_server_did_request_set_prompt_text(Badge<WebContentClient>, String const& message) override;
virtual void notify_server_did_request_accept_dialog(Badge<WebContentClient>) override;
virtual void notify_server_did_request_dismiss_dialog(Badge<WebContentClient>) override;
virtual void notify_server_did_get_source(const AK::URL& url, String const& source) override;
virtual void notify_server_did_get_dom_tree(String const& dom_tree) override;
virtual void notify_server_did_get_dom_node_properties(i32 node_id, String const& specified_style, String const& computed_style, String const& custom_properties, String const& node_box_sizing) override;
@ -185,6 +188,7 @@ private:
bool m_should_show_line_box_borders { false };
QPointer<QWidget> m_inspector_widget;
QPointer<QDialog> m_dialog;
Ladybird::ConsoleWidget* m_console_widget { nullptr };