aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index acf97518f..d62c5df61 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1204,7 +1204,19 @@ uri_changed_cb (WebKitWebView *web_view,
}
#ifdef HAVE_WEBKIT2
-/* TODO: Mouse target changed */
+static void
+mouse_target_changed_cb (EphyWebView *web_view,
+ WebKitHitTestResult *hit_test_result,
+ guint modifiers,
+ gpointer data)
+{
+ const char *message = NULL;
+
+ if (webkit_hit_test_result_context_is_link (hit_test_result))
+ message = webkit_hit_test_result_get_link_uri (hit_test_result);
+
+ ephy_web_view_set_link_message (web_view, message);
+}
#else
static void
hovering_over_link_cb (EphyWebView *web_view,
@@ -2700,7 +2712,9 @@ ephy_web_view_init (EphyWebView *web_view)
NULL);
#ifdef HAVE_WEBKIT2
- /* TODO: Mouse target changed */
+ g_signal_connect (web_view, "mouse-target-changed",
+ G_CALLBACK (mouse_target_changed_cb),
+ NULL);
#else
g_signal_connect (web_view, "hovering-over-link",
G_CALLBACK (hovering_over_link_cb),