summaryrefslogtreecommitdiff
path: root/Demos/WebView/WebContentView.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-07-05 15:43:43 +0200
committerAndreas Kling <kling@serenityos.org>2020-07-05 15:57:07 +0200
commit131bc8fd31a43c385e04d4d634e1dda180bbff24 (patch)
tree116c64b3a2638c617e7f92159636ea099f4a14b8 /Demos/WebView/WebContentView.cpp
parent56d14d57013af3d1f7efbf957b2632b0390d2e0f (diff)
downloadserenity-131bc8fd31a43c385e04d4d634e1dda180bbff24.zip
WebContent: Plumb scroll-into-view requests from server to client
The WebContentView widget will now be able to react to scroll-into-view requests from the WebContent process.
Diffstat (limited to 'Demos/WebView/WebContentView.cpp')
-rw-r--r--Demos/WebView/WebContentView.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Demos/WebView/WebContentView.cpp b/Demos/WebView/WebContentView.cpp
index 47d226d585..97e5ddf0e8 100644
--- a/Demos/WebView/WebContentView.cpp
+++ b/Demos/WebView/WebContentView.cpp
@@ -115,6 +115,11 @@ void WebContentView::notify_server_did_change_title(Badge<WebContentClient>, con
on_title_change(title);
}
+void WebContentView::notify_server_did_request_scroll_into_view(Badge<WebContentClient>, const Gfx::IntRect& rect)
+{
+ scroll_into_view(rect, true, true);
+}
+
void WebContentView::did_scroll()
{
client().post_message(Messages::WebContentServer::SetViewportRect(visible_content_rect()));