Title: [95999] trunk
Revision
95999
Author
[email protected]
Date
2011-09-26 15:00:06 -0700 (Mon, 26 Sep 2011)

Log Message

Source/WebKit2: Added WKHitTestResult API's.

WKHitTestResult API's are added. These API's can be used to
get the hover'ed link/image/media URL as well as link lable and
title.
https://bugs.webkit.org/show_bug.cgi?id=68426

Patch by Nayan Kumar K <[email protected]> on 2011-09-26
Reviewed by Anders Carlsson.

* CMakeLists.txt:
* GNUmakefile.am:
* UIProcess/API/C/WKHitTestResult.cpp: Added.
(WKHitTestResultGetTypeID):
(WKHitTestResultCopyAbsoluteImageURL):
(WKHitTestResultCopyAbsoluteLinkURL):
(WKHitTestResultCopyAbsoluteMediaURL):
(WKHitTestResultCopyLinkLabel):
(WKHitTestResultCopyLinkTitle):
* UIProcess/API/C/WKHitTestResult.h: Added.
* UIProcess/API/C/WebKit2.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebKit2API.pri:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:

Tools: Get hover'ed element URL from HitTest.

mouseDidMoveOverElement now gets the hover'ed element link using
WKHitTestResult API's.
https://bugs.webkit.org/show_bug.cgi?id=68426

Patch by Nayan Kumar K <[email protected]> on 2011-09-26
Reviewed by Anders Carlsson.

* MiniBrowser/gtk/BrowserWindow.c:
(mouseDidMoveOverElement):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit2/CMakeLists.txt (95998 => 95999)


--- trunk/Source/WebKit2/CMakeLists.txt	2011-09-26 21:47:46 UTC (rev 95998)
+++ trunk/Source/WebKit2/CMakeLists.txt	2011-09-26 22:00:06 UTC (rev 95999)
@@ -191,6 +191,7 @@
     UIProcess/API/C/WKFormSubmissionListener.cpp
     UIProcess/API/C/WKFrame.cpp
     UIProcess/API/C/WKFramePolicyListener.cpp
+    UIProcess/API/C/WKHitTestResult.cpp
     UIProcess/API/C/WKIconDatabase.cpp
     UIProcess/API/C/WKInspector.cpp
     UIProcess/API/C/WKKeyValueStorageManager.cpp

Modified: trunk/Source/WebKit2/ChangeLog (95998 => 95999)


--- trunk/Source/WebKit2/ChangeLog	2011-09-26 21:47:46 UTC (rev 95998)
+++ trunk/Source/WebKit2/ChangeLog	2011-09-26 22:00:06 UTC (rev 95999)
@@ -1,3 +1,30 @@
+2011-09-26  Nayan Kumar K  <[email protected]>
+
+        Added WKHitTestResult API's.
+
+        WKHitTestResult API's are added. These API's can be used to
+        get the hover'ed link/image/media URL as well as link lable and
+        title.
+        https://bugs.webkit.org/show_bug.cgi?id=68426
+
+        Reviewed by Anders Carlsson.
+
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * UIProcess/API/C/WKHitTestResult.cpp: Added.
+        (WKHitTestResultGetTypeID):
+        (WKHitTestResultCopyAbsoluteImageURL):
+        (WKHitTestResultCopyAbsoluteLinkURL):
+        (WKHitTestResultCopyAbsoluteMediaURL):
+        (WKHitTestResultCopyLinkLabel):
+        (WKHitTestResultCopyLinkTitle):
+        * UIProcess/API/C/WKHitTestResult.h: Added.
+        * UIProcess/API/C/WebKit2.h:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebKit2API.pri:
+        * win/WebKit2.vcproj:
+        * win/WebKit2Generated.make:
+
 2011-09-26  Csaba Osztrogonác  <[email protected]>
 
         [Qt][WK2]Unreviewed speculative buildfix after r95968.

Modified: trunk/Source/WebKit2/GNUmakefile.am (95998 => 95999)


--- trunk/Source/WebKit2/GNUmakefile.am	2011-09-26 21:47:46 UTC (rev 95998)
+++ trunk/Source/WebKit2/GNUmakefile.am	2011-09-26 22:00:06 UTC (rev 95999)
@@ -48,6 +48,7 @@
 	$(WebKit2)/UIProcess/API/C/WKFormSubmissionListener.h \
 	$(WebKit2)/UIProcess/API/C/WKFrame.h \
 	$(WebKit2)/UIProcess/API/C/WKFramePolicyListener.h \
+	$(WebKit2)/UIProcess/API/C/WKHitTestResult.h \
 	$(WebKit2)/UIProcess/API/C/WKInspector.h \
 	$(WebKit2)/UIProcess/API/C/WKKeyValueStorageManager.h \
 	$(WebKit2)/UIProcess/API/C/WKMediaCacheManager.h \
@@ -413,6 +414,8 @@
 	Source/WebKit2/UIProcess/API/C/WKFrame.h \
 	Source/WebKit2/UIProcess/API/C/WKFramePolicyListener.cpp \
 	Source/WebKit2/UIProcess/API/C/WKFramePolicyListener.h \
+	Source/WebKit2/UIProcess/API/C/WKHitTestResult.cpp \
+	Source/WebKit2/UIProcess/API/C/WKHitTestResult.h \
 	Source/WebKit2/UIProcess/API/C/WKIconDatabase.cpp \
 	Source/WebKit2/UIProcess/API/C/WKIconDatabase.h \
 	Source/WebKit2/UIProcess/API/C/WKInspector.cpp \

Copied: trunk/Source/WebKit2/UIProcess/API/C/WKHitTestResult.cpp (from rev 95998, trunk/Source/WebKit2/UIProcess/API/C/WebKit2.h) (0 => 95999)


--- trunk/Source/WebKit2/UIProcess/API/C/WKHitTestResult.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKHitTestResult.cpp	2011-09-26 22:00:06 UTC (rev 95999)
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Portions Copyright (c) 2010 Motorola Mobility, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WKHitTestResult.h"
+
+#include "WKAPICast.h"
+#include "WebHitTestResult.h"
+
+using namespace WebKit;
+
+WKTypeID WKHitTestResultGetTypeID()
+{
+    return toAPI(WebHitTestResult::APIType);
+}
+
+WKURLRef WKHitTestResultCopyAbsoluteImageURL(WKHitTestResultRef hitTestResultRef)
+{
+    return toCopiedURLAPI(toImpl(hitTestResultRef)->absoluteImageURL());
+}
+
+WKURLRef WKHitTestResultCopyAbsoluteLinkURL(WKHitTestResultRef hitTestResultRef)
+{
+    return toCopiedURLAPI(toImpl(hitTestResultRef)->absoluteLinkURL());
+}
+
+WKURLRef WKHitTestResultCopyAbsoluteMediaURL(WKHitTestResultRef hitTestResultRef)
+{
+    return toCopiedURLAPI(toImpl(hitTestResultRef)->absoluteMediaURL());
+}
+
+WKStringRef WKHitTestResultCopyLinkLabel(WKHitTestResultRef hitTestResultRef)
+{
+    return toCopiedAPI(toImpl(hitTestResultRef)->linkLabel());
+}
+
+WKStringRef WKHitTestResultCopyLinkTitle(WKHitTestResultRef hitTestResultRef)
+{
+    return toCopiedAPI(toImpl(hitTestResultRef)->linkTitle());
+}

Copied: trunk/Source/WebKit2/UIProcess/API/C/WKHitTestResult.h (from rev 95998, trunk/Source/WebKit2/UIProcess/API/C/WebKit2.h) (0 => 95999)


--- trunk/Source/WebKit2/UIProcess/API/C/WKHitTestResult.h	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKHitTestResult.h	2011-09-26 22:00:06 UTC (rev 95999)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Portions Copyright (c) 2010 Motorola Mobility, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WKHitTestResult_h
+#define WKHitTestResult_h
+
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT WKTypeID WKHitTestResultGetTypeID();
+
+WK_EXPORT WKURLRef WKHitTestResultCopyAbsoluteImageURL(WKHitTestResultRef hitTestResult);
+WK_EXPORT WKURLRef WKHitTestResultCopyAbsoluteLinkURL(WKHitTestResultRef hitTestResult);
+WK_EXPORT WKURLRef WKHitTestResultCopyAbsoluteMediaURL(WKHitTestResultRef hitTestResult);
+
+WK_EXPORT WKStringRef WKHitTestResultCopyLinkLabel(WKHitTestResultRef hitTestResult);
+WK_EXPORT WKStringRef WKHitTestResultCopyLinkTitle(WKHitTestResultRef hitTestResult);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKHitTestResult_h */

Modified: trunk/Source/WebKit2/UIProcess/API/C/WebKit2.h (95998 => 95999)


--- trunk/Source/WebKit2/UIProcess/API/C/WebKit2.h	2011-09-26 21:47:46 UTC (rev 95998)
+++ trunk/Source/WebKit2/UIProcess/API/C/WebKit2.h	2011-09-26 22:00:06 UTC (rev 95999)
@@ -43,6 +43,7 @@
 #include <WebKit2/WKGeolocationPermissionRequest.h>
 #include <WebKit2/WKGeolocationPosition.h>
 #include <WebKit2/WKGraphicsContext.h>
+#include <WebKit2/WKHitTestResult.h>
 #include <WebKit2/WKMutableArray.h>
 #include <WebKit2/WKMutableDictionary.h>
 #include <WebKit2/WKNavigationData.h>

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (95998 => 95999)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2011-09-26 21:47:46 UTC (rev 95998)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2011-09-26 22:00:06 UTC (rev 95999)
@@ -422,6 +422,8 @@
 		93FC67BE12D3CCF200A60610 /* DecoderAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = 93FC679E12D3CC7400A60610 /* DecoderAdapter.h */; };
 		93FC67BF12D3CCF200A60610 /* EncoderAdapter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93FC679F12D3CC7400A60610 /* EncoderAdapter.cpp */; };
 		93FC67C012D3CCF200A60610 /* EncoderAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = 93FC67A012D3CC7400A60610 /* EncoderAdapter.h */; };
+		B62E7310143047A60069EC35 /* WKHitTestResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B62E730F143047A60069EC35 /* WKHitTestResult.cpp */; };
+		B62E7312143047B00069EC35 /* WKHitTestResult.h in Headers */ = {isa = PBXBuildFile; fileRef = B62E7311143047B00069EC35 /* WKHitTestResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		B878B615133428DC006888E9 /* CorrectionPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = B878B613133428DC006888E9 /* CorrectionPanel.h */; };
 		B878B616133428DC006888E9 /* CorrectionPanel.mm in Sources */ = {isa = PBXBuildFile; fileRef = B878B614133428DC006888E9 /* CorrectionPanel.mm */; };
 		BC0092F7115837A300E0AE2A /* RunLoopMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC0092F5115837A300E0AE2A /* RunLoopMac.mm */; };
@@ -1371,6 +1373,8 @@
 		93FC67A012D3CC7400A60610 /* EncoderAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EncoderAdapter.h; sourceTree = "<group>"; };
 		A72D5D7F1236CBA800A88B15 /* WebSerializedScriptValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSerializedScriptValue.h; sourceTree = "<group>"; };
 		B396EA5512E0ED2D00F4FEB7 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
+		B62E730F143047A60069EC35 /* WKHitTestResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKHitTestResult.cpp; sourceTree = "<group>"; };
+		B62E7311143047B00069EC35 /* WKHitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKHitTestResult.h; sourceTree = "<group>"; };
 		B878B613133428DC006888E9 /* CorrectionPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CorrectionPanel.h; sourceTree = "<group>"; };
 		B878B614133428DC006888E9 /* CorrectionPanel.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CorrectionPanel.mm; sourceTree = "<group>"; };
 		BC0092F5115837A300E0AE2A /* RunLoopMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RunLoopMac.mm; sourceTree = "<group>"; };
@@ -2773,6 +2777,8 @@
 		BC0C376610F807660076D7CB /* C */ = {
 			isa = PBXGroup;
 			children = (
+				B62E7311143047B00069EC35 /* WKHitTestResult.h */,
+				B62E730F143047A60069EC35 /* WKHitTestResult.cpp */,
 				5123CF18133D25E60056F800 /* cg */,
 				6EE849C41368D9040038D481 /* mac */,
 				BCB63477116BF10600603215 /* WebKit2.h */,
@@ -3862,6 +3868,7 @@
 				1A2BB6D114117B4D000F35D4 /* PluginProcessConnectionMessages.h in Headers */,
 				7801C09A142290C400FAF9AF /* WebHitTestResult.h in Headers */,
 				0F174AA3142A4CB70039250F /* WebGeometry.h in Headers */,
+				B62E7312143047B00069EC35 /* WKHitTestResult.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -4549,6 +4556,7 @@
 				1A2BB6D014117B4D000F35D4 /* PluginProcessConnectionMessageReceiver.cpp in Sources */,
 				7801C099142290C400FAF9AF /* WebHitTestResult.cpp in Sources */,
 				0F174AA7142AAC610039250F /* WKGeometry.cpp in Sources */,
+				B62E7310143047A60069EC35 /* WKHitTestResult.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: trunk/Source/WebKit2/WebKit2API.pri (95998 => 95999)


--- trunk/Source/WebKit2/WebKit2API.pri	2011-09-26 21:47:46 UTC (rev 95998)
+++ trunk/Source/WebKit2/WebKit2API.pri	2011-09-26 22:00:06 UTC (rev 95999)
@@ -34,6 +34,7 @@
     $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKGeolocationManager.cpp \
     $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKGeolocationPermissionRequest.cpp \
     $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKGeolocationPosition.cpp \
+    $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKHitTestResult.cpp \
     $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKIconDatabase.cpp \
     $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKInspector.cpp \
     $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp \
@@ -108,6 +109,7 @@
     $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKGeolocationManager.h \
     $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKGeolocationPermissionRequest.h \
     $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKGeolocationPosition.h \
+    $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKHitTestResult.h \
     $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKIconDatabase.h \
     $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKInspector.h \
     $$SOURCE_DIR/WebKit2/UIProcess/API/C/WKOpenPanelParameters.h \

Modified: trunk/Source/WebKit2/win/WebKit2.vcproj (95998 => 95999)


--- trunk/Source/WebKit2/win/WebKit2.vcproj	2011-09-26 21:47:46 UTC (rev 95998)
+++ trunk/Source/WebKit2/win/WebKit2.vcproj	2011-09-26 22:00:06 UTC (rev 95999)
@@ -3257,6 +3257,14 @@
 						>
 					</File>
 					<File
+						RelativePath="..\UIProcess\API\C\WKHitTestResult.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\UIProcess\API\C\WKHitTestResult.h"
+						>
+					</File>
+					<File
 						RelativePath="..\UIProcess\API\C\WKIconDatabase.cpp"
 						>
 					</File>

Modified: trunk/Source/WebKit2/win/WebKit2Generated.make (95998 => 95999)


--- trunk/Source/WebKit2/win/WebKit2Generated.make	2011-09-26 21:47:46 UTC (rev 95998)
+++ trunk/Source/WebKit2/win/WebKit2Generated.make	2011-09-26 22:00:06 UTC (rev 95999)
@@ -63,6 +63,7 @@
     xcopy /y /d "..\UIProcess\API\C\WKGeolocationManager.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKGeolocationPermissionRequest.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKGeolocationPosition.h" "%ConfigurationBuildDir%\include\WebKit2"
+    xcopy /y /d "..\UIProcess\API\C\WKHitTestResult.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKInspector.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKIconDatabase.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKKeyValueStorageManager.h" "%ConfigurationBuildDir%\include\WebKit2"

Modified: trunk/Tools/ChangeLog (95998 => 95999)


--- trunk/Tools/ChangeLog	2011-09-26 21:47:46 UTC (rev 95998)
+++ trunk/Tools/ChangeLog	2011-09-26 22:00:06 UTC (rev 95999)
@@ -1,3 +1,16 @@
+2011-09-26  Nayan Kumar K  <[email protected]>
+
+        Get hover'ed element URL from HitTest.
+
+        mouseDidMoveOverElement now gets the hover'ed element link using
+        WKHitTestResult API's.
+        https://bugs.webkit.org/show_bug.cgi?id=68426 
+
+        Reviewed by Anders Carlsson.
+
+        * MiniBrowser/gtk/BrowserWindow.c:
+        (mouseDidMoveOverElement):
+
 2011-09-26  David Levin  <[email protected]>
 
         Add skeleton parsing for a WatchList.

Modified: trunk/Tools/MiniBrowser/gtk/BrowserWindow.c (95998 => 95999)


--- trunk/Tools/MiniBrowser/gtk/BrowserWindow.c	2011-09-26 21:47:46 UTC (rev 95998)
+++ trunk/Tools/MiniBrowser/gtk/BrowserWindow.c	2011-09-26 22:00:06 UTC (rev 95999)
@@ -592,18 +592,17 @@
     return returnValue;
 }
 
-static void mouseDidMoveOverElement(WKPageRef page, WKEventModifiers modifiers, WKTypeRef userData, const void *clientInfo)
+static void mouseDidMoveOverElement(WKPageRef page, WKHitTestResultRef hitTestResult, WKEventModifiers modifiers, WKTypeRef userData, const void *clientInfo)
 {
     BrowserWindow *window = BROWSER_WINDOW(clientInfo);
     gtk_statusbar_pop(GTK_STATUSBAR(window->statusBar), window->statusBarContextId);
 
-    if (!userData)
+    WKURLRef linkUrlRef = WKHitTestResultCopyAbsoluteLinkURL(hitTestResult);
+    if (!linkUrlRef)
         return;
 
-    if (WKGetTypeID(userData) != WKURLGetTypeID())
-        return;
-
-    gchar *link = WKURLGetCString((WKURLRef)userData);
+    gchar *link = WKURLGetCString(linkUrlRef);
+    WKRelease(linkUrlRef);
     gtk_statusbar_push(GTK_STATUSBAR(window->statusBar), window->statusBarContextId, link);
     g_free(link);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to