summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebContentClient.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2021-09-08 11:22:44 +0100
committerLinus Groh <mail@linusgroh.de>2021-09-11 15:51:05 +0100
commita09219159c9be273edf44155219f14aa6e9880dc (patch)
treea92312f2707759f55b0d8148f5d6ddfb7fdeef6a /Userland/Libraries/LibWeb/WebContentClient.cpp
parent92a3318375edb2058ac5d840eb7c16652c820998 (diff)
downloadserenity-a09219159c9be273edf44155219f14aa6e9880dc.zip
LibWeb+WebContent: Modify did_request_scroll() IPC to take x&y deltas
This is in preparation for implementing JS scrolling functions, which specify both x and y scrolling deltas. The visible behavior has not changed. Also, moved the "mouse wheel delta * 20" calculation to the `EventHandler` since the JS calls will want to work directly in pixels.
Diffstat (limited to 'Userland/Libraries/LibWeb/WebContentClient.cpp')
-rw-r--r--Userland/Libraries/LibWeb/WebContentClient.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/WebContentClient.cpp b/Userland/Libraries/LibWeb/WebContentClient.cpp
index b248e32f88..be1fe18082 100644
--- a/Userland/Libraries/LibWeb/WebContentClient.cpp
+++ b/Userland/Libraries/LibWeb/WebContentClient.cpp
@@ -68,9 +68,9 @@ void WebContentClient::did_change_title(String const& title)
m_view.notify_server_did_change_title({}, title);
}
-void WebContentClient::did_request_scroll(int wheel_delta)
+void WebContentClient::did_request_scroll(i32 x_delta, i32 y_delta)
{
- m_view.notify_server_did_request_scroll({}, wheel_delta);
+ m_view.notify_server_did_request_scroll({}, x_delta, y_delta);
}
void WebContentClient::did_request_scroll_into_view(Gfx::IntRect const& rect)