1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 22:35:07 +00:00

WebContent: Basic scrolling support! :^)

The WebContentView widget now inherits from GUI::ScrollableWidget and
will pass its scroll offset over to the WebContent process as it's
changing. This is not super efficient and can get a bit laggy, but it
will do fine as an initial scrolling implementation.

Just like the single-process Web::PageView widget, WebContentView also
paints scrolled content by translating the Gfx::Painter.
This commit is contained in:
Andreas Kling 2020-07-04 23:19:32 +02:00
parent ada3c9ca46
commit e91871aed7
7 changed files with 58 additions and 13 deletions

View file

@ -74,3 +74,11 @@ void WebContentClient::handle(const Messages::WebContentClient::DidChangeSelecti
#endif
m_view.notify_server_did_change_selection({});
}
void WebContentClient::handle(const Messages::WebContentClient::DidLayout& message)
{
#ifdef DEBUG_SPAM
dbg() << "handle: WebContentClient::DidLayout! content_size=" << message.content_size();
#endif
m_view.notify_server_did_layout({}, message.content_size());
}