summaryrefslogtreecommitdiff
path: root/Userland/Services
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/Services
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/Services')
-rw-r--r--Userland/Services/WebContent/PageHost.cpp5
-rw-r--r--Userland/Services/WebContent/PageHost.h1
-rw-r--r--Userland/Services/WebContent/WebContentClient.ipc1
3 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp
index 1818313d29..4ffabbc4c3 100644
--- a/Userland/Services/WebContent/PageHost.cpp
+++ b/Userland/Services/WebContent/PageHost.cpp
@@ -131,6 +131,11 @@ void PageHost::page_did_change_title(const String& title)
m_client.post_message(Messages::WebContentClient::DidChangeTitle(title));
}
+void PageHost::page_did_request_scroll(int wheel_delta)
+{
+ m_client.post_message(Messages::WebContentClient::DidRequestScroll(wheel_delta));
+}
+
void PageHost::page_did_request_scroll_into_view(const Gfx::IntRect& rect)
{
m_client.post_message(Messages::WebContentClient::DidRequestScrollIntoView(rect));
diff --git a/Userland/Services/WebContent/PageHost.h b/Userland/Services/WebContent/PageHost.h
index 29f28da8d8..066dd69481 100644
--- a/Userland/Services/WebContent/PageHost.h
+++ b/Userland/Services/WebContent/PageHost.h
@@ -59,6 +59,7 @@ private:
virtual void page_did_request_cursor_change(Gfx::StandardCursor) override;
virtual void page_did_layout() override;
virtual void page_did_change_title(const String&) override;
+ virtual void page_did_request_scroll(int) override;
virtual void page_did_request_scroll_into_view(const Gfx::IntRect&) override;
virtual void page_did_hover_link(const URL&) override;
virtual void page_did_unhover_link() override;
diff --git a/Userland/Services/WebContent/WebContentClient.ipc b/Userland/Services/WebContent/WebContentClient.ipc
index af3e80d18a..6d1b7ebd3a 100644
--- a/Userland/Services/WebContent/WebContentClient.ipc
+++ b/Userland/Services/WebContent/WebContentClient.ipc
@@ -8,6 +8,7 @@ endpoint WebContentClient = 90
DidRequestCursorChange(i32 cursor_type) =|
DidLayout(Gfx::IntSize content_size) =|
DidChangeTitle(String title) =|
+ DidRequestScroll(int wheel_delta) =|
DidRequestScrollIntoView(Gfx::IntRect rect) =|
DidHoverLink(URL url) =|
DidUnhoverLink() =|