diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-05 17:05:23 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-05 17:05:23 +0200 |
commit | d4fe3e8009b64d7af340c02674b9affcf7c02422 (patch) | |
tree | 408a2ce158976f88c7a797d00fc554ffda8829bc | |
parent | 63d796312d1833ee63afbb767fffc20cd2bb377f (diff) | |
download | serenity-d4fe3e8009b64d7af340c02674b9affcf7c02422.zip |
LibWeb: Always fire the link hover hooks when moving between links
Some broken logic was preventing us from firing the hover hooks when
the cursor jumped directly from one link to another.
-rw-r--r-- | Libraries/LibWeb/Frame/EventHandler.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/Libraries/LibWeb/Frame/EventHandler.cpp b/Libraries/LibWeb/Frame/EventHandler.cpp index bdf9dc966d..f5def91650 100644 --- a/Libraries/LibWeb/Frame/EventHandler.cpp +++ b/Libraries/LibWeb/Frame/EventHandler.cpp @@ -171,7 +171,6 @@ bool EventHandler::handle_mousemove(const Gfx::IntPoint& position, unsigned butt bool hovered_node_changed = false; bool is_hovering_link = false; - bool was_hovering_link = document.hovered_node() && document.hovered_node()->is_link(); auto result = layout_root.hit_test(position); const HTMLAnchorElement* hovered_link_element = nullptr; if (result.layout_node) { @@ -210,8 +209,6 @@ bool EventHandler::handle_mousemove(const Gfx::IntPoint& position, unsigned butt } else { page_client.page_did_leave_tooltip_area(); } - } - if (is_hovering_link != was_hovering_link) { if (is_hovering_link) page_client.page_did_hover_link(document.complete_url(hovered_link_element->href())); else |