diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2021-09-08 11:44:36 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-11 15:51:05 +0100 |
commit | 83414af9f3feb01e3afddfe05a472d1f83d0bcff (patch) | |
tree | 89adb354bbbccaa6bbbf968d8fe4d4deb5bf963d /Userland/Services | |
parent | a09219159c9be273edf44155219f14aa6e9880dc (diff) | |
download | serenity-83414af9f3feb01e3afddfe05a472d1f83d0bcff.zip |
LibWeb+WebContent: Add WebContentClient::did_request_scroll_to() call
This call sets the absolute scroll position for the window.
Diffstat (limited to 'Userland/Services')
-rw-r--r-- | Userland/Services/WebContent/PageHost.cpp | 5 | ||||
-rw-r--r-- | Userland/Services/WebContent/PageHost.h | 1 | ||||
-rw-r--r-- | Userland/Services/WebContent/WebContentClient.ipc | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp index 42bf80e8a6..0b2f0a4ae6 100644 --- a/Userland/Services/WebContent/PageHost.cpp +++ b/Userland/Services/WebContent/PageHost.cpp @@ -109,6 +109,11 @@ void PageHost::page_did_request_scroll(i32 x_delta, i32 y_delta) m_client.async_did_request_scroll(x_delta, y_delta); } +void PageHost::page_did_request_scroll_to(Gfx::IntPoint const& scroll_position) +{ + m_client.async_did_request_scroll_to(scroll_position); +} + void PageHost::page_did_request_scroll_into_view(const Gfx::IntRect& rect) { m_client.async_did_request_scroll_into_view(rect); diff --git a/Userland/Services/WebContent/PageHost.h b/Userland/Services/WebContent/PageHost.h index 535f862191..ef4b48208a 100644 --- a/Userland/Services/WebContent/PageHost.h +++ b/Userland/Services/WebContent/PageHost.h @@ -42,6 +42,7 @@ private: virtual void page_did_layout() override; virtual void page_did_change_title(const String&) override; virtual void page_did_request_scroll(i32, i32) override; + virtual void page_did_request_scroll_to(Gfx::IntPoint const&) override; virtual void page_did_request_scroll_into_view(const Gfx::IntRect&) override; virtual void page_did_enter_tooltip_area(const Gfx::IntPoint&, const String&) override; virtual void page_did_leave_tooltip_area() override; diff --git a/Userland/Services/WebContent/WebContentClient.ipc b/Userland/Services/WebContent/WebContentClient.ipc index 3a2905ff9a..4bf8178037 100644 --- a/Userland/Services/WebContent/WebContentClient.ipc +++ b/Userland/Services/WebContent/WebContentClient.ipc @@ -13,6 +13,7 @@ endpoint WebContentClient did_layout(Gfx::IntSize content_size) =| did_change_title(String title) =| did_request_scroll(i32 x_delta, i32 y_delta) =| + did_request_scroll_to(Gfx::IntPoint scroll_position) =| did_request_scroll_into_view(Gfx::IntRect rect) =| did_enter_tooltip_area(Gfx::IntPoint content_position, String title) =| did_leave_tooltip_area() =| |