1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:47:36 +00:00

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.
This commit is contained in:
Andreas Kling 2020-07-05 15:43:43 +02:00
parent 56d14d5701
commit 131bc8fd31
7 changed files with 22 additions and 0 deletions

View file

@ -129,4 +129,9 @@ void PageHost::page_did_change_title(const String& title)
m_client.post_message(Messages::WebContentClient::DidChangeTitle(title));
}
void PageHost::page_did_request_scroll_into_view(const Gfx::IntRect& rect)
{
m_client.post_message(Messages::WebContentClient::DidRequestScrollIntoView(rect));
}
}

View file

@ -55,6 +55,7 @@ private:
virtual void page_did_change_selection() override;
virtual void page_did_layout() override;
virtual void page_did_change_title(const String&) override;
virtual void page_did_request_scroll_into_view(const Gfx::IntRect&) override;
explicit PageHost(ClientConnection&);

View file

@ -6,4 +6,5 @@ endpoint WebContentClient = 90
DidChangeSelection() =|
DidLayout(Gfx::IntSize content_size) =|
DidChangeTitle(String title) =|
DidRequestScrollIntoView(Gfx::IntRect rect) =|
}