1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00

LibWeb+WebContent: Support displaying tooltips in OOPWV

This commit is contained in:
Timothy Flynn 2021-03-30 12:10:06 -04:00 committed by Andreas Kling
parent c503047c71
commit 5b617df496
7 changed files with 39 additions and 0 deletions

View file

@ -28,6 +28,7 @@
#include "WebContentClient.h"
#include <AK/String.h>
#include <AK/URLParser.h>
#include <LibGUI/Application.h>
#include <LibGUI/InputBox.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/Painter.h>
@ -255,6 +256,16 @@ void OutOfProcessWebView::notify_server_did_request_scroll_into_view(Badge<WebCo
scroll_into_view(rect, true, true);
}
void OutOfProcessWebView::notify_server_did_enter_tooltip_area(Badge<WebContentClient>, const Gfx::IntPoint&, const String& title)
{
GUI::Application::the()->show_tooltip(title, nullptr);
}
void OutOfProcessWebView::notify_server_did_leave_tooltip_area(Badge<WebContentClient>)
{
GUI::Application::the()->hide_tooltip();
}
void OutOfProcessWebView::notify_server_did_hover_link(Badge<WebContentClient>, const URL& url)
{
if (on_link_hover)