diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-05 15:43:43 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-05 15:57:07 +0200 |
commit | 131bc8fd31a43c385e04d4d634e1dda180bbff24 (patch) | |
tree | 116c64b3a2638c617e7f92159636ea099f4a14b8 /Demos/WebView/WebContentView.cpp | |
parent | 56d14d57013af3d1f7efbf957b2632b0390d2e0f (diff) | |
download | serenity-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.cpp | 5 |
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())); |