diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2021-09-08 11:22:44 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-11 15:51:05 +0100 |
commit | a09219159c9be273edf44155219f14aa6e9880dc (patch) | |
tree | a92312f2707759f55b0d8148f5d6ddfb7fdeef6a /Userland/Libraries/LibWeb/WebContentClient.cpp | |
parent | 92a3318375edb2058ac5d840eb7c16652c820998 (diff) | |
download | serenity-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.cpp | 4 |
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) |