1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 17:57:36 +00:00

Ladybird+LibWebView: Migrate cursor changes to LibWebView callbacks

This commit is contained in:
Timothy Flynn 2023-08-23 10:43:27 -04:00 committed by Tim Flynn
parent bf464665a7
commit 00fe122b0a
9 changed files with 14 additions and 20 deletions

View file

@ -104,12 +104,6 @@ Optional<WebViewBridge::Paintable> WebViewBridge::paintable()
return Paintable { *bitmap, bitmap_size };
}
void WebViewBridge::notify_server_did_request_cursor_change(Badge<WebView::WebContentClient>, Gfx::StandardCursor cursor)
{
if (on_cursor_change)
on_cursor_change(cursor);
}
void WebViewBridge::notify_server_did_request_scroll(Badge<WebView::WebContentClient>, i32 x_delta, i32 y_delta)
{
// FIXME: This currently isn't reached because we do not yet propagate mouse wheel events to WebContent.

View file

@ -51,15 +51,12 @@ public:
Function<void(Gfx::IntPoint)> on_scroll;
Function<void(Gfx::StandardCursor)> on_cursor_change;
Function<void(DeprecatedString const&)> on_tooltip_entered;
Function<void()> on_tooltip_left;
private:
WebViewBridge(Vector<Gfx::IntRect> screen_rects, float device_pixel_ratio, Optional<StringView> webdriver_content_ipc_path);
virtual void notify_server_did_request_cursor_change(Badge<WebView::WebContentClient>, Gfx::StandardCursor cursor) override;
virtual void notify_server_did_request_scroll(Badge<WebView::WebContentClient>, i32, i32) override;
virtual void notify_server_did_request_scroll_to(Badge<WebView::WebContentClient>, Gfx::IntPoint) override;
virtual void notify_server_did_request_scroll_into_view(Badge<WebView::WebContentClient>, Gfx::IntRect const&) override;