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

WebContent: Plumb title changes over to the WebContentView

WebContentView now fires its on_title_change hook, like Web::PageView.
We use this in the WebView test app to update the window title. :^)
This commit is contained in:
Andreas Kling 2020-07-04 23:40:17 +02:00
parent 7cb7bcb924
commit c15f9e7593
8 changed files with 30 additions and 1 deletions

View file

@ -108,6 +108,12 @@ void WebContentView::notify_server_did_layout(Badge<WebContentClient>, const Gfx
set_content_size(content_size);
}
void WebContentView::notify_server_did_change_title(Badge<WebContentClient>, const String& title)
{
if (on_title_change)
on_title_change(title);
}
void WebContentView::did_scroll()
{
client().post_message(Messages::WebContentServer::SetViewportRect(Gfx::IntRect({ horizontal_scrollbar().value(), vertical_scrollbar().value() }, size())));