mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 17:05:10 +00:00
Ladybird+LibWebView: Migrate tooltip changes to LibWebView callbacks
This commit is contained in:
parent
78d9339aa9
commit
5116e97a9d
10 changed files with 27 additions and 53 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue