summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2021-09-08 11:44:36 +0100
committerLinus Groh <mail@linusgroh.de>2021-09-11 15:51:05 +0100
commit83414af9f3feb01e3afddfe05a472d1f83d0bcff (patch)
tree89adb354bbbccaa6bbbf968d8fe4d4deb5bf963d /Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
parenta09219159c9be273edf44155219f14aa6e9880dc (diff)
downloadserenity-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/Libraries/LibWeb/OutOfProcessWebView.cpp')
-rw-r--r--Userland/Libraries/LibWeb/OutOfProcessWebView.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
index 241173070f..6eec7399ca 100644
--- a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
+++ b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
@@ -241,6 +241,12 @@ void OutOfProcessWebView::notify_server_did_request_scroll(Badge<WebContentClien
vertical_scrollbar().set_value(vertical_scrollbar().value() + y_delta);
}
+void OutOfProcessWebView::notify_server_did_request_scroll_to(Badge<WebContentClient>, Gfx::IntPoint const& scroll_position)
+{
+ horizontal_scrollbar().set_value(scroll_position.x());
+ vertical_scrollbar().set_value(scroll_position.y());
+}
+
void OutOfProcessWebView::notify_server_did_request_scroll_into_view(Badge<WebContentClient>, const Gfx::IntRect& rect)
{
scroll_into_view(rect, true, true);