mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Do not assume hovered URLs are valid
Let's just not display any tooltip for invalid URLs. This matches how Firefox behaves.
This commit is contained in:
parent
73b01a975a
commit
2a68087dfc
Notes:
github-actions[bot]
2025-10-27 14:16:15 +00:00
Author: https://github.com/trflynn89
Commit: 2a68087dfc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6602
Reviewed-by: https://github.com/tcl3 ✅
2 changed files with 8 additions and 2 deletions
|
|
@ -874,8 +874,10 @@ EventResult EventHandler::handle_mousemove(CSSPixelPoint visual_viewport_positio
|
|||
}
|
||||
|
||||
if (is_hovering_link) {
|
||||
page.set_is_hovering_link(true);
|
||||
page.client().page_did_hover_link(*document.encoding_parse_url(hovered_link_element->href()));
|
||||
if (auto link_url = document.encoding_parse_url(hovered_link_element->href()); link_url.has_value()) {
|
||||
page.set_is_hovering_link(true);
|
||||
page.client().page_did_hover_link(*link_url);
|
||||
}
|
||||
} else if (page.is_hovering_link()) {
|
||||
page.set_is_hovering_link(false);
|
||||
page.client().page_did_unhover_link();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue