mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 08:35:07 +00:00
LibWeb: Tweak PageView::on_link_hover hook
Change: on_link_hover(String) -> on_link_hover(URL) Also, we now fire the hook when a link is unhovered as well, allowing the embedder to react to nothing being hovered anymore.
This commit is contained in:
parent
58b1ba2545
commit
63d796312d
3 changed files with 9 additions and 4 deletions
|
@ -232,11 +232,13 @@ void PageView::page_did_leave_tooltip_area()
|
|||
void PageView::page_did_hover_link(const URL& url)
|
||||
{
|
||||
if (on_link_hover)
|
||||
on_link_hover(url.to_string());
|
||||
on_link_hover(url);
|
||||
}
|
||||
|
||||
void PageView::page_did_unhover_link()
|
||||
{
|
||||
if (on_link_hover)
|
||||
on_link_hover({});
|
||||
}
|
||||
|
||||
void PageView::page_did_invalidate(const Gfx::IntRect&)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue