[epiphany/webkit2: 8/17] Port hovering over linke to WebKit2
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/webkit2: 8/17] Port hovering over linke to WebKit2
- Date: Thu, 21 Jun 2012 11:15:01 +0000 (UTC)
commit 6422c112077fceddb78b7318a612b9e0205523f6
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Wed May 30 16:59:10 2012 +0200
Port hovering over linke to WebKit2
embed/ephy-web-view.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 50a61ce..ee7b91e 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)
+{
+ if (!webkit_hit_test_result_context_is_link (hit_test_result)) {
+ ephy_web_view_set_link_message (web_view, NULL);
+ return;
+ }
+ ephy_web_view_set_link_message (web_view,
+ webkit_hit_test_result_get_link_uri (hit_test_result));
+}
#else
static void
hovering_over_link_cb (EphyWebView *web_view,
@@ -2684,7 +2696,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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]