summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
diff options
context:
space:
mode:
authorAngus Gibson <angus@agibson.me>2021-03-02 08:39:07 +1100
committerAndreas Kling <kling@serenityos.org>2021-03-02 13:20:03 +0100
commit0e881bc5d723578cf09d4db61e93cb5405b8c983 (patch)
treec98d38afddf6aff41f85f8498a944aac646e7d81 /Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
parente9c1d9c89af74239e27f872355897a4ba35818ad (diff)
downloadserenity-0e881bc5d723578cf09d4db61e93cb5405b8c983.zip
LibWeb: Handle scrolling an OutOfProcessWebView
When a mousewheel scroll event isn't handled by the web content itself (e.g. an overflowed box or similar), the event needs to get passed back up to the OutOfProcessWebView.
Diffstat (limited to 'Userland/Libraries/LibWeb/OutOfProcessWebView.cpp')
-rw-r--r--Userland/Libraries/LibWeb/OutOfProcessWebView.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
index d237314168..ad736e70f3 100644
--- a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
+++ b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
@@ -245,6 +245,11 @@ void OutOfProcessWebView::notify_server_did_change_title(Badge<WebContentClient>
on_title_change(title);
}
+void OutOfProcessWebView::notify_server_did_request_scroll(Badge<WebContentClient>, int wheel_delta)
+{
+ vertical_scrollbar().set_value(vertical_scrollbar().value() + wheel_delta * 20);
+}
+
void OutOfProcessWebView::notify_server_did_request_scroll_into_view(Badge<WebContentClient>, const Gfx::IntRect& rect)
{
scroll_into_view(rect, true, true);