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

WebContent: Plumb hovered links from WebContent process over to widget

Also add a little GUI::StatusBar to the demo app so we can see the
hovered link URL's live. :^)
This commit is contained in:
Andreas Kling 2020-07-05 16:59:20 +02:00
parent aac362b883
commit 58b1ba2545
8 changed files with 61 additions and 1 deletions

View file

@ -134,4 +134,14 @@ void PageHost::page_did_request_scroll_into_view(const Gfx::IntRect& rect)
m_client.post_message(Messages::WebContentClient::DidRequestScrollIntoView(rect));
}
void PageHost::page_did_hover_link(const URL& url)
{
m_client.post_message(Messages::WebContentClient::DidHoverLink(url));
}
void PageHost::page_did_unhover_link()
{
m_client.post_message(Messages::WebContentClient::DidUnhoverLink());
}
}

View file

@ -56,6 +56,8 @@ private:
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;
virtual void page_did_hover_link(const URL&) override;
virtual void page_did_unhover_link() override;
explicit PageHost(ClientConnection&);

View file

@ -7,4 +7,6 @@ endpoint WebContentClient = 90
DidLayout(Gfx::IntSize content_size) =|
DidChangeTitle(String title) =|
DidRequestScrollIntoView(Gfx::IntRect rect) =|
DidHoverLink(URL url) =|
DidUnhoverLink() =|
}