mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09:00
Ladybird+LibWebView: Migrate scrolling changes to LibWebView callbacks
This commit is contained in:
parent
00fe122b0a
commit
78d9339aa9
Notes:
sideshowbarker
2024-07-17 03:14:39 +09:00
Author: https://github.com/trflynn89
Commit: 78d9339aa9
Pull-request: https://github.com/SerenityOS/serenity/pull/20727
Reviewed-by: https://github.com/awesomekling ✅
10 changed files with 73 additions and 98 deletions
|
@ -109,18 +109,21 @@ void WebContentClient::did_change_title(DeprecatedString const& title)
|
|||
|
||||
void WebContentClient::did_request_scroll(i32 x_delta, i32 y_delta)
|
||||
{
|
||||
m_view.notify_server_did_request_scroll({}, x_delta, y_delta);
|
||||
if (m_view.on_scroll_by_delta)
|
||||
m_view.on_scroll_by_delta(x_delta, y_delta);
|
||||
}
|
||||
|
||||
void WebContentClient::did_request_scroll_to(Gfx::IntPoint scroll_position)
|
||||
{
|
||||
m_view.notify_server_did_request_scroll_to({}, scroll_position);
|
||||
if (m_view.on_scroll_to_point)
|
||||
m_view.on_scroll_to_point(scroll_position);
|
||||
}
|
||||
|
||||
void WebContentClient::did_request_scroll_into_view(Gfx::IntRect const& rect)
|
||||
{
|
||||
dbgln_if(SPAM_DEBUG, "handle: WebContentClient::DidRequestScrollIntoView! rect={}", rect);
|
||||
m_view.notify_server_did_request_scroll_into_view({}, rect);
|
||||
if (m_view.on_scroll_into_view)
|
||||
m_view.on_scroll_into_view(rect);
|
||||
}
|
||||
|
||||
void WebContentClient::did_enter_tooltip_area(Gfx::IntPoint content_position, DeprecatedString const& title)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue