From ebdcba8b3bdc114959b2a0c71921edf6f6a2c885 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 17 May 2023 14:23:34 -0400 Subject: [PATCH] Ladybird+LibWebView: Migrate dialog APIs to LibWebView callbacks --- Ladybird/AppKit/UI/LadybirdWebView.mm | 12 ++-- Ladybird/AppKit/UI/LadybirdWebViewBridge.cpp | 52 ----------------- Ladybird/AppKit/UI/LadybirdWebViewBridge.h | 19 ------ Ladybird/Qt/Tab.cpp | 48 +++++++++++++++ Ladybird/Qt/Tab.h | 3 + Ladybird/Qt/WebContentView.cpp | 55 ------------------ Ladybird/Qt/WebContentView.h | 9 --- Userland/Applications/Browser/Tab.cpp | 57 ++++++++++++++++++ Userland/Applications/Browser/Tab.h | 2 + .../LibWebView/OutOfProcessWebView.cpp | 58 ------------------- .../LibWebView/OutOfProcessWebView.h | 8 --- .../LibWebView/ViewImplementation.cpp | 15 +++++ .../Libraries/LibWebView/ViewImplementation.h | 16 +++-- .../Libraries/LibWebView/WebContentClient.cpp | 18 ++++-- Userland/Utilities/headless-browser.cpp | 6 -- 15 files changed, 153 insertions(+), 225 deletions(-) diff --git a/Ladybird/AppKit/UI/LadybirdWebView.mm b/Ladybird/AppKit/UI/LadybirdWebView.mm index 02673cc4b3c..bf63b1d8852 100644 --- a/Ladybird/AppKit/UI/LadybirdWebView.mm +++ b/Ladybird/AppKit/UI/LadybirdWebView.mm @@ -416,7 +416,7 @@ struct HideCursor { [NSMenu popUpContextMenu:self.video_context_menu withEvent:event forView:self]; }; - m_web_view_bridge->on_alert = [self](auto const& message) { + m_web_view_bridge->on_request_alert = [self](auto const& message) { auto* ns_message = Ladybird::string_to_ns_string(message); self.dialog = [[NSAlert alloc] init]; @@ -429,7 +429,7 @@ struct HideCursor { }]; }; - m_web_view_bridge->on_confirm = [self](auto const& message) { + m_web_view_bridge->on_request_confirm = [self](auto const& message) { auto* ns_message = Ladybird::string_to_ns_string(message); self.dialog = [[NSAlert alloc] init]; @@ -444,7 +444,7 @@ struct HideCursor { }]; }; - m_web_view_bridge->on_prompt = [self](auto const& message, auto const& default_) { + m_web_view_bridge->on_request_prompt = [self](auto const& message, auto const& default_) { auto* ns_message = Ladybird::string_to_ns_string(message); auto* ns_default = Ladybird::string_to_ns_string(default_); @@ -472,7 +472,7 @@ struct HideCursor { }]; }; - m_web_view_bridge->on_prompt_text_changed = [self](auto const& message) { + m_web_view_bridge->on_request_set_prompt_text = [self](auto const& message) { if (self.dialog == nil || [self.dialog accessoryView] == nil) { return; } @@ -483,7 +483,7 @@ struct HideCursor { [input setStringValue:ns_message]; }; - m_web_view_bridge->on_dialog_accepted = [self]() { + m_web_view_bridge->on_request_accept_dialog = [self]() { if (self.dialog == nil) { return; } @@ -492,7 +492,7 @@ struct HideCursor { returnCode:NSModalResponseOK]; }; - m_web_view_bridge->on_dialog_dismissed = [self]() { + m_web_view_bridge->on_request_dismiss_dialog = [self]() { if (self.dialog == nil) { return; } diff --git a/Ladybird/AppKit/UI/LadybirdWebViewBridge.cpp b/Ladybird/AppKit/UI/LadybirdWebViewBridge.cpp index 56ee2da9730..fb0307fc36d 100644 --- a/Ladybird/AppKit/UI/LadybirdWebViewBridge.cpp +++ b/Ladybird/AppKit/UI/LadybirdWebViewBridge.cpp @@ -197,58 +197,6 @@ void WebViewBridge::notify_server_did_leave_tooltip_area(Badge, String const& message) -{ - if (on_alert) - on_alert(message); -} - -void WebViewBridge::alert_closed() -{ - client().async_alert_closed(); -} - -void WebViewBridge::notify_server_did_request_confirm(Badge, String const& message) -{ - if (on_confirm) - on_confirm(message); -} - -void WebViewBridge::confirm_closed(bool accepted) -{ - client().async_confirm_closed(accepted); -} - -void WebViewBridge::notify_server_did_request_prompt(Badge, String const& message, String const& default_) -{ - if (on_prompt) - on_prompt(message, default_); -} - -void WebViewBridge::prompt_closed(Optional response) -{ - client().async_prompt_closed(move(response)); -} - -void WebViewBridge::notify_server_did_request_set_prompt_text(Badge, String const& message) -{ - if (on_prompt_text_changed) - on_prompt_text_changed(message); -} - -void WebViewBridge::notify_server_did_request_accept_dialog(Badge) -{ - if (on_dialog_accepted) - on_dialog_accepted(); -} - -void WebViewBridge::notify_server_did_request_dismiss_dialog(Badge) -{ - if (on_dialog_dismissed) - on_dialog_dismissed(); -} - void WebViewBridge::notify_server_did_request_file(Badge, DeprecatedString const& path, i32 request_id) { auto file = Core::File::open(path, Core::File::OpenMode::Read); diff --git a/Ladybird/AppKit/UI/LadybirdWebViewBridge.h b/Ladybird/AppKit/UI/LadybirdWebViewBridge.h index 796f181c7a7..b45d7c72641 100644 --- a/Ladybird/AppKit/UI/LadybirdWebViewBridge.h +++ b/Ladybird/AppKit/UI/LadybirdWebViewBridge.h @@ -59,19 +59,6 @@ public: Function on_tooltip_entered; Function on_tooltip_left; - Function on_alert; - void alert_closed(); - - Function on_confirm; - void confirm_closed(bool); - - Function on_prompt; - Function on_prompt_text_changed; - void prompt_closed(Optional); - - Function on_dialog_accepted; - Function on_dialog_dismissed; - private: WebViewBridge(Vector screen_rects, float device_pixel_ratio, Optional webdriver_content_ipc_path); @@ -85,12 +72,6 @@ private: virtual void notify_server_did_request_scroll_into_view(Badge, Gfx::IntRect const&) override; virtual void notify_server_did_enter_tooltip_area(Badge, Gfx::IntPoint, DeprecatedString const&) override; virtual void notify_server_did_leave_tooltip_area(Badge) override; - virtual void notify_server_did_request_alert(Badge, String const& message) override; - virtual void notify_server_did_request_confirm(Badge, String const& message) override; - virtual void notify_server_did_request_prompt(Badge, String const& message, String const& default_) override; - virtual void notify_server_did_request_set_prompt_text(Badge, String const& message) override; - virtual void notify_server_did_request_accept_dialog(Badge) override; - virtual void notify_server_did_request_dismiss_dialog(Badge) override; virtual void notify_server_did_request_file(Badge, DeprecatedString const& path, i32) override; virtual void notify_server_did_finish_handling_input_event(bool event_was_accepted) override; diff --git a/Ladybird/Qt/Tab.cpp b/Ladybird/Qt/Tab.cpp index 624a9f8c201..cacbb104921 100644 --- a/Ladybird/Qt/Tab.cpp +++ b/Ladybird/Qt/Tab.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -165,6 +166,53 @@ Tab::Tab(BrowserWindow* window, StringView webdriver_content_ipc_path, WebView:: emit favicon_changed(tab_index(), QIcon(qpixmap)); }; + view().on_request_alert = [this](auto const& message) { + m_dialog = new QMessageBox(QMessageBox::Icon::Warning, "Ladybird", qstring_from_ak_string(message), QMessageBox::StandardButton::Ok, &view()); + m_dialog->exec(); + + view().alert_closed(); + m_dialog = nullptr; + }; + + view().on_request_confirm = [this](auto const& message) { + m_dialog = new QMessageBox(QMessageBox::Icon::Question, "Ladybird", qstring_from_ak_string(message), QMessageBox::StandardButton::Ok | QMessageBox::StandardButton::Cancel, &view()); + auto result = m_dialog->exec(); + + view().confirm_closed(result == QMessageBox::StandardButton::Ok || result == QDialog::Accepted); + m_dialog = nullptr; + }; + + view().on_request_prompt = [this](auto const& message, auto const& default_) { + m_dialog = new QInputDialog(&view()); + auto& dialog = static_cast(*m_dialog); + + dialog.setWindowTitle("Ladybird"); + dialog.setLabelText(qstring_from_ak_string(message)); + dialog.setTextValue(qstring_from_ak_string(default_)); + + if (dialog.exec() == QDialog::Accepted) + view().prompt_closed(ak_string_from_qstring(dialog.textValue()).release_value_but_fixme_should_propagate_errors()); + else + view().prompt_closed({}); + + m_dialog = nullptr; + }; + + view().on_request_set_prompt_text = [this](auto const& message) { + if (m_dialog && is(*m_dialog)) + static_cast(*m_dialog).setTextValue(qstring_from_ak_string(message)); + }; + + view().on_request_accept_dialog = [this]() { + if (m_dialog) + m_dialog->accept(); + }; + + view().on_request_dismiss_dialog = [this]() { + if (m_dialog) + m_dialog->reject(); + }; + QObject::connect(focus_location_editor_action, &QAction::triggered, this, &Tab::focus_location_editor); view().on_get_source = [this](auto const& url, auto const& source) { diff --git a/Ladybird/Qt/Tab.h b/Ladybird/Qt/Tab.h index 279d70d9f25..a66fe652059 100644 --- a/Ladybird/Qt/Tab.h +++ b/Ladybird/Qt/Tab.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -111,6 +112,8 @@ private: Ladybird::ConsoleWidget* m_console_widget { nullptr }; OwnPtr m_console_context_menu; Ladybird::InspectorWidget* m_inspector_widget { nullptr }; + + QPointer m_dialog; }; } diff --git a/Ladybird/Qt/WebContentView.cpp b/Ladybird/Qt/WebContentView.cpp index c511e78f078..2f13485779f 100644 --- a/Ladybird/Qt/WebContentView.cpp +++ b/Ladybird/Qt/WebContentView.cpp @@ -37,9 +37,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -727,59 +725,6 @@ void WebContentView::notify_server_did_leave_tooltip_area(Badge, String const& message) -{ - m_dialog = new QMessageBox(QMessageBox::Icon::Warning, "Ladybird", qstring_from_ak_string(message), QMessageBox::StandardButton::Ok, this); - m_dialog->exec(); - - client().async_alert_closed(); - m_dialog = nullptr; -} - -void WebContentView::notify_server_did_request_confirm(Badge, String const& message) -{ - m_dialog = new QMessageBox(QMessageBox::Icon::Question, "Ladybird", qstring_from_ak_string(message), QMessageBox::StandardButton::Ok | QMessageBox::StandardButton::Cancel, this); - auto result = m_dialog->exec(); - - client().async_confirm_closed(result == QMessageBox::StandardButton::Ok || result == QDialog::Accepted); - m_dialog = nullptr; -} - -void WebContentView::notify_server_did_request_prompt(Badge, String const& message, String const& default_) -{ - m_dialog = new QInputDialog(this); - auto& dialog = static_cast(*m_dialog); - - dialog.setWindowTitle("Ladybird"); - dialog.setLabelText(qstring_from_ak_string(message)); - dialog.setTextValue(qstring_from_ak_string(default_)); - - if (dialog.exec() == QDialog::Accepted) - client().async_prompt_closed(ak_string_from_qstring(dialog.textValue()).release_value_but_fixme_should_propagate_errors()); - else - client().async_prompt_closed({}); - - m_dialog = nullptr; -} - -void WebContentView::notify_server_did_request_set_prompt_text(Badge, String const& message) -{ - if (m_dialog && is(*m_dialog)) - static_cast(*m_dialog).setTextValue(qstring_from_ak_string(message)); -} - -void WebContentView::notify_server_did_request_accept_dialog(Badge) -{ - if (m_dialog) - m_dialog->accept(); -} - -void WebContentView::notify_server_did_request_dismiss_dialog(Badge) -{ - if (m_dialog) - m_dialog->reject(); -} - void WebContentView::notify_server_did_request_file(Badge, DeprecatedString const& path, i32 request_id) { auto file = Core::File::open(path, Core::File::OpenMode::Read); diff --git a/Ladybird/Qt/WebContentView.h b/Ladybird/Qt/WebContentView.h index 91e671d469b..a6af2616445 100644 --- a/Ladybird/Qt/WebContentView.h +++ b/Ladybird/Qt/WebContentView.h @@ -22,7 +22,6 @@ #include #include #include -#include #include class QTextEdit; @@ -87,12 +86,6 @@ public: virtual void notify_server_did_request_scroll_into_view(Badge, Gfx::IntRect const&) override; virtual void notify_server_did_enter_tooltip_area(Badge, Gfx::IntPoint, DeprecatedString const&) override; virtual void notify_server_did_leave_tooltip_area(Badge) override; - virtual void notify_server_did_request_alert(Badge, String const& message) override; - virtual void notify_server_did_request_confirm(Badge, String const& message) override; - virtual void notify_server_did_request_prompt(Badge, String const& message, String const& default_) override; - virtual void notify_server_did_request_set_prompt_text(Badge, String const& message) override; - virtual void notify_server_did_request_accept_dialog(Badge) override; - virtual void notify_server_did_request_dismiss_dialog(Badge) override; virtual void notify_server_did_request_file(Badge, DeprecatedString const& path, i32) override; virtual void notify_server_did_finish_handling_input_event(bool event_was_accepted) override; @@ -113,8 +106,6 @@ private: bool m_should_show_line_box_borders { false }; UseLagomNetworking m_use_lagom_networking {}; - QPointer m_dialog; - Gfx::IntRect m_viewport_rect; StringView m_webdriver_content_ipc_path; diff --git a/Userland/Applications/Browser/Tab.cpp b/Userland/Applications/Browser/Tab.cpp index 63b47a53a56..ae44f8ffb4b 100644 --- a/Userland/Applications/Browser/Tab.cpp +++ b/Userland/Applications/Browser/Tab.cpp @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include #include #include @@ -508,6 +510,61 @@ Tab::Tab(BrowserWindow& window) on_update_cookie(cookie); }; + view().on_request_alert = [this](String const& message) { + auto& window = this->window(); + + m_dialog = GUI::MessageBox::create(&window, message, "Alert"sv, GUI::MessageBox::Type::Information, GUI::MessageBox::InputType::OK).release_value_but_fixme_should_propagate_errors(); + m_dialog->set_icon(window.icon()); + m_dialog->exec(); + + view().alert_closed(); + m_dialog = nullptr; + }; + + view().on_request_confirm = [this](String const& message) { + auto& window = this->window(); + + m_dialog = GUI::MessageBox::create(&window, message, "Confirm"sv, GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::OKCancel).release_value_but_fixme_should_propagate_errors(); + m_dialog->set_icon(window.icon()); + + view().confirm_closed(m_dialog->exec() == GUI::Dialog::ExecResult::OK); + m_dialog = nullptr; + }; + + view().on_request_prompt = [this](String const& message, String const& default_) { + auto& window = this->window(); + + String mutable_value = default_; + m_dialog = GUI::InputBox::create(&window, mutable_value, message, "Prompt"sv, GUI::InputType::Text).release_value_but_fixme_should_propagate_errors(); + m_dialog->set_icon(window.icon()); + + if (m_dialog->exec() == GUI::InputBox::ExecResult::OK) { + auto const& dialog = static_cast(*m_dialog); + auto response = dialog.text_value(); + + view().prompt_closed(move(response)); + } else { + view().prompt_closed({}); + } + + m_dialog = nullptr; + }; + + view().on_request_set_prompt_text = [this](String const& message) { + if (m_dialog && is(*m_dialog)) + static_cast(*m_dialog).set_text_value(message); + }; + + view().on_request_accept_dialog = [this]() { + if (m_dialog) + m_dialog->done(GUI::Dialog::ExecResult::OK); + }; + + view().on_request_dismiss_dialog = [this]() { + if (m_dialog) + m_dialog->done(GUI::Dialog::ExecResult::Cancel); + }; + view().on_get_source = [this](auto& url, auto& source) { view_source(url, source); }; diff --git a/Userland/Applications/Browser/Tab.h b/Userland/Applications/Browser/Tab.h index 780f7cc830a..99015ce242a 100644 --- a/Userland/Applications/Browser/Tab.h +++ b/Userland/Applications/Browser/Tab.h @@ -136,6 +136,8 @@ private: RefPtr m_statusbar; RefPtr m_toolbar_container; + RefPtr m_dialog; + RefPtr m_link_context_menu; RefPtr m_link_context_menu_default_action; URL m_link_context_menu_url; diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp index 4f5e6d0449a..45c1708876f 100644 --- a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp +++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp @@ -10,9 +10,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -234,61 +231,6 @@ void OutOfProcessWebView::notify_server_did_leave_tooltip_area(Badgehide_tooltip(); } -void OutOfProcessWebView::notify_server_did_request_alert(Badge, String const& message) -{ - m_dialog = GUI::MessageBox::create(window(), message, "Alert"sv, GUI::MessageBox::Type::Information, GUI::MessageBox::InputType::OK).release_value_but_fixme_should_propagate_errors(); - m_dialog->set_icon(window()->icon()); - m_dialog->exec(); - - client().async_alert_closed(); - m_dialog = nullptr; -} - -void OutOfProcessWebView::notify_server_did_request_confirm(Badge, String const& message) -{ - m_dialog = GUI::MessageBox::create(window(), message, "Confirm"sv, GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::OKCancel).release_value_but_fixme_should_propagate_errors(); - m_dialog->set_icon(window()->icon()); - - client().async_confirm_closed(m_dialog->exec() == GUI::Dialog::ExecResult::OK); - m_dialog = nullptr; -} - -void OutOfProcessWebView::notify_server_did_request_prompt(Badge, String const& message, String const& default_) -{ - String mutable_value = default_; - m_dialog = GUI::InputBox::create(window(), mutable_value, message, "Prompt"sv, GUI::InputType::Text).release_value_but_fixme_should_propagate_errors(); - m_dialog->set_icon(window()->icon()); - - if (m_dialog->exec() == GUI::InputBox::ExecResult::OK) { - auto const& dialog = static_cast(*m_dialog); - auto response = dialog.text_value(); - - client().async_prompt_closed(move(response)); - } else { - client().async_prompt_closed({}); - } - - m_dialog = nullptr; -} - -void OutOfProcessWebView::notify_server_did_request_set_prompt_text(Badge, String const& message) -{ - if (m_dialog && is(*m_dialog)) - static_cast(*m_dialog).set_text_value(message); -} - -void OutOfProcessWebView::notify_server_did_request_accept_dialog(Badge) -{ - if (m_dialog) - m_dialog->done(GUI::Dialog::ExecResult::OK); -} - -void OutOfProcessWebView::notify_server_did_request_dismiss_dialog(Badge) -{ - if (m_dialog) - m_dialog->done(GUI::Dialog::ExecResult::Cancel); -} - void OutOfProcessWebView::notify_server_did_request_file(Badge, DeprecatedString const& path, i32 request_id) { auto file = FileSystemAccessClient::Client::the().request_file_read_only_approved(window(), path); diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.h b/Userland/Libraries/LibWebView/OutOfProcessWebView.h index 8b6377d148a..454f760880b 100644 --- a/Userland/Libraries/LibWebView/OutOfProcessWebView.h +++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.h @@ -92,12 +92,6 @@ private: virtual void notify_server_did_request_scroll_into_view(Badge, Gfx::IntRect const&) override; virtual void notify_server_did_enter_tooltip_area(Badge, Gfx::IntPoint, DeprecatedString const&) override; virtual void notify_server_did_leave_tooltip_area(Badge) override; - virtual void notify_server_did_request_alert(Badge, String const& message) override; - virtual void notify_server_did_request_confirm(Badge, String const& message) override; - virtual void notify_server_did_request_prompt(Badge, String const& message, String const& default_) override; - virtual void notify_server_did_request_set_prompt_text(Badge, String const& message) override; - virtual void notify_server_did_request_accept_dialog(Badge) override; - virtual void notify_server_did_request_dismiss_dialog(Badge) override; virtual void notify_server_did_request_file(Badge, DeprecatedString const& path, i32) override; virtual void notify_server_did_finish_handling_input_event(bool event_was_accepted) override; @@ -109,8 +103,6 @@ private: void enqueue_input_event(InputEvent const&); void process_next_input_event(); - RefPtr m_dialog; - bool m_is_awaiting_response_for_input_event { false }; Queue m_pending_input_events; diff --git a/Userland/Libraries/LibWebView/ViewImplementation.cpp b/Userland/Libraries/LibWebView/ViewImplementation.cpp index 1ddb8cf8771..7bcca7e89e4 100644 --- a/Userland/Libraries/LibWebView/ViewImplementation.cpp +++ b/Userland/Libraries/LibWebView/ViewImplementation.cpp @@ -152,6 +152,21 @@ void ViewImplementation::js_console_request_messages(i32 start_index) client().async_js_console_request_messages(start_index); } +void ViewImplementation::alert_closed() +{ + client().async_alert_closed(); +} + +void ViewImplementation::confirm_closed(bool accepted) +{ + client().async_confirm_closed(accepted); +} + +void ViewImplementation::prompt_closed(Optional response) +{ + client().async_prompt_closed(move(response)); +} + void ViewImplementation::toggle_media_play_state() { client().async_toggle_media_play_state(); diff --git a/Userland/Libraries/LibWebView/ViewImplementation.h b/Userland/Libraries/LibWebView/ViewImplementation.h index e9609e457d4..97327c1c38f 100644 --- a/Userland/Libraries/LibWebView/ViewImplementation.h +++ b/Userland/Libraries/LibWebView/ViewImplementation.h @@ -75,6 +75,10 @@ public: void js_console_input(DeprecatedString const& js_source); void js_console_request_messages(i32 start_index); + void alert_closed(); + void confirm_closed(bool accepted); + void prompt_closed(Optional response); + void toggle_media_play_state(); void toggle_media_mute_state(); void toggle_media_loop_state(); @@ -104,6 +108,12 @@ public: Function on_navigate_forward; Function on_refresh; Function on_favicon_change; + Function on_request_alert; + Function on_request_confirm; + Function on_request_prompt; + Function on_request_set_prompt_text; + Function on_request_accept_dialog; + Function on_request_dismiss_dialog; Function on_get_source; Function on_get_dom_tree; Function on_get_dom_node_properties; @@ -133,12 +143,6 @@ public: virtual void notify_server_did_request_scroll_into_view(Badge, Gfx::IntRect const&) = 0; virtual void notify_server_did_enter_tooltip_area(Badge, Gfx::IntPoint, DeprecatedString const&) = 0; virtual void notify_server_did_leave_tooltip_area(Badge) = 0; - virtual void notify_server_did_request_alert(Badge, String const& message) = 0; - virtual void notify_server_did_request_confirm(Badge, String const& message) = 0; - virtual void notify_server_did_request_prompt(Badge, String const& message, String const& default_) = 0; - virtual void notify_server_did_request_set_prompt_text(Badge, String const& message) = 0; - virtual void notify_server_did_request_accept_dialog(Badge) = 0; - virtual void notify_server_did_request_dismiss_dialog(Badge) = 0; virtual void notify_server_did_request_file(Badge, DeprecatedString const& path, i32) = 0; virtual void notify_server_did_finish_handling_input_event(bool event_was_accepted) = 0; diff --git a/Userland/Libraries/LibWebView/WebContentClient.cpp b/Userland/Libraries/LibWebView/WebContentClient.cpp index bd6db2294c3..aac70309ad9 100644 --- a/Userland/Libraries/LibWebView/WebContentClient.cpp +++ b/Userland/Libraries/LibWebView/WebContentClient.cpp @@ -220,32 +220,38 @@ void WebContentClient::did_get_js_console_messages(i32 start_index, Vector, Gfx::IntRect const&) override { } void notify_server_did_enter_tooltip_area(Badge, Gfx::IntPoint, DeprecatedString const&) override { } void notify_server_did_leave_tooltip_area(Badge) override { } - void notify_server_did_request_alert(Badge, String const&) override { } - void notify_server_did_request_confirm(Badge, String const&) override { } - void notify_server_did_request_prompt(Badge, String const&, String const&) override { } - void notify_server_did_request_set_prompt_text(Badge, String const&) override { } - void notify_server_did_request_accept_dialog(Badge) override { } - void notify_server_did_request_dismiss_dialog(Badge) override { } void notify_server_did_request_file(Badge, DeprecatedString const& path, i32 request_id) override {