mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 16:58:52 +00:00
LibWeb: Support window.alert() in multi-process context
Alerts are now delegated to the embedding GUI process.
This commit is contained in:
parent
aba793fb3e
commit
d9e39cb82d
Notes:
sideshowbarker
2024-07-19 02:43:50 +09:00
Author: https://github.com/awesomekling
Commit: d9e39cb82d
11 changed files with 33 additions and 2 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "OutOfProcessWebView.h"
|
||||
#include "WebContentClient.h"
|
||||
#include <AK/SharedBuffer.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
@ -179,6 +180,11 @@ void OutOfProcessWebView::notify_server_did_request_link_context_menu(Badge<WebC
|
|||
on_link_context_menu_request(url, screen_relative_rect().location().translated(to_widget_position(content_position)));
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::notify_server_did_request_alert(Badge<WebContentClient>, const String& message)
|
||||
{
|
||||
GUI::MessageBox::show(window(), message, "Alert", GUI::MessageBox::Type::Information);
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::did_scroll()
|
||||
{
|
||||
client().post_message(Messages::WebContentServer::SetViewportRect(visible_content_rect()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue