2007-09-29 Lars Lindner <lars.lindner@gmail.com>
authorzecke <zecke@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2007 21:44:30 +0000 (21:44 +0000)
committerzecke <zecke@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2007 21:44:30 +0000 (21:44 +0000)
        Reviewed by Adam.

        ChromeClientGtk.cpp does not implement mouseDidMoveOverElement()
        http://bugs.webkit.org/show_bug.cgi?id=15299

        Implementing "hovering_over_link" signal.

        * WebCoreSupport/ChromeClientGtk.cpp:
        (WebKit::ChromeClient::mouseDidMoveOverElement):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25818 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/gtk/ChangeLog
WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp

index 5c3bb5519179819226aca822bf5799f1230a45f1..25abd76fe57ffb4a27c30229a0ae0b347670bcca 100644 (file)
@@ -1,3 +1,15 @@
+2007-09-29  Lars Lindner  <lars.lindner@gmail.com>
+
+        Reviewed by Adam.
+
+        ChromeClientGtk.cpp does not implement mouseDidMoveOverElement()
+        http://bugs.webkit.org/show_bug.cgi?id=15299
+
+        Implementing "hovering_over_link" signal.
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        (WebKit::ChromeClient::mouseDidMoveOverElement):
+
 2007-09-26  Mark Rowe  <mrowe@apple.com>
 
         Gtk build fix.
index 018689f579f2177a261ce00361076ec9b0ac11da..221dc3ed773d9efcdd76a50f0c3e44b051df5925 100644 (file)
@@ -32,6 +32,8 @@
 #include "IntRect.h"
 #include "PlatformString.h"
 #include "CString.h"
+#include "HitTestResult.h"
+#include "KURL.h"
 #include "webkitgtkpage.h"
 #include "webkitgtkprivate.h"
 #include "NotImplemented.h"
@@ -268,9 +270,16 @@ void ChromeClient::updateBackingStore()
     notImplemented();
 }
 
-void ChromeClient::mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags)
+void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned modifierFlags)
 {
-    notImplemented();
+    // check if the element is a link...
+    KURL url = hit.absoluteLinkURL();
+    if(!url.isEmpty()) {
+        CString titleString = hit.title().utf8();
+        DeprecatedCString urlString = url.prettyURL().utf8();
+        g_signal_emit_by_name(m_webPage, "hovering_over_link", titleString.data(), urlString.data());
+    } else
+        g_signal_emit_by_name(m_webPage, "hovering_over_link", 0, 0);
 }
 
 void ChromeClient::setToolTip(const String&)