mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
Ladybird+LibWebView: Migrate tooltip changes to LibWebView callbacks
This commit is contained in:
Notes:
sideshowbarker
2024-07-16 23:59:28 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/5116e97a9d Pull-request: https://github.com/SerenityOS/serenity/pull/20727 Reviewed-by: https://github.com/awesomekling ✅
@@ -63,6 +63,14 @@ OutOfProcessWebView::OutOfProcessWebView()
|
||||
on_cursor_change = [this](auto cursor) {
|
||||
set_override_cursor(cursor);
|
||||
};
|
||||
|
||||
on_enter_tooltip_area = [](auto, auto tooltip) {
|
||||
GUI::Application::the()->show_tooltip(tooltip, nullptr);
|
||||
};
|
||||
|
||||
on_leave_tooltip_area = []() {
|
||||
GUI::Application::the()->hide_tooltip();
|
||||
};
|
||||
}
|
||||
|
||||
OutOfProcessWebView::~OutOfProcessWebView() = default;
|
||||
@@ -201,16 +209,6 @@ void OutOfProcessWebView::screen_rects_change_event(GUI::ScreenRectsChangeEvent&
|
||||
client().async_update_screen_rects(event.rects(), event.main_screen_index());
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::notify_server_did_enter_tooltip_area(Badge<WebContentClient>, Gfx::IntPoint, DeprecatedString const& 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::did_scroll()
|
||||
{
|
||||
client().async_set_viewport_rect(visible_content_rect());
|
||||
|
||||
Reference in New Issue
Block a user