2011-09-16 Igor Oliveira <igor.oliveira@openbossa.org>
authorigor.oliveira@openbossa.org <igor.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Sep 2011 17:31:31 +0000 (17:31 +0000)
committerigor.oliveira@openbossa.org <igor.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Sep 2011 17:31:31 +0000 (17:31 +0000)
        [WK2] mouseDidMoveOverElement needs to send more information about hovered element to UiProcess.
        https://bugs.webkit.org/show_bug.cgi?id=68125

        This patch implements support for the UiProcess to know what is the link url of a hovered element.

        Reviewed by Anders Carlsson.

        * CMakeLists.txt:
        * GNUmakefile.am:
        * Shared/API/c/WKBase.h:
        * Shared/APIObject.h:
        * Shared/WebHitTestResult.cpp: Added.

        WebHitTestResult has hovered element information.

        (WebKit::WebHitTestResult::create):
        (WebKit::WebHitTestResult::Data::encode):
        (WebKit::WebHitTestResult::Data::decode):
        * Shared/WebHitTestResult.h: Added.
        (WebKit::WebHitTestResult::absoluteImageURL):
        (WebKit::WebHitTestResult::absoluteLinkURL):
        (WebKit::WebHitTestResult::absoluteMediaURL):
        (WebKit::WebHitTestResult::linkLabel):
        (WebKit::WebHitTestResult::linkTitle):
        (WebKit::WebHitTestResult::WebHitTestResult):
        (WebKit::WebHitTestResult::type):
        * UIProcess/API/C/WKAPICast.h:
        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::mouseDidMoveOverElement):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/WebUIClient.cpp:
        (WebKit::WebUIClient::mouseDidMoveOverElement):
        * UIProcess/WebUIClient.h:
        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::mouseDidMoveOverElement):
        * win/WebKit2.vcproj:

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

18 files changed:
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/GNUmakefile.am
Source/WebKit2/Shared/API/c/WKBase.h
Source/WebKit2/Shared/APIObject.h
Source/WebKit2/Shared/WebHitTestResult.cpp [new file with mode: 0644]
Source/WebKit2/Shared/WebHitTestResult.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/C/WKAPICast.h
Source/WebKit2/UIProcess/API/C/WKPage.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/WebUIClient.cpp
Source/WebKit2/UIProcess/WebUIClient.h
Source/WebKit2/WebKit2.pro
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/win/WebKit2.vcproj

index 2d0b34b..f670c2f 100644 (file)
@@ -161,6 +161,7 @@ SET(WebKit2_SOURCES
     Shared/WebEvent.cpp
     Shared/WebGeolocationPosition.cpp
     Shared/WebGraphicsContext.cpp
+    Shared/WebHitTestResult.cpp
     Shared/WebImage.cpp
     Shared/WebKeyboardEvent.cpp
     Shared/WebMouseEvent.cpp
index 0f57578..735620b 100644 (file)
@@ -1,3 +1,46 @@
+2011-09-16  Igor Oliveira  <igor.oliveira@openbossa.org>
+
+        [WK2] mouseDidMoveOverElement needs to send more information about hovered element to UiProcess.
+        https://bugs.webkit.org/show_bug.cgi?id=68125
+
+        This patch implements support for the UiProcess to know what is the link url of a hovered element.
+
+        Reviewed by Anders Carlsson.
+
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * Shared/API/c/WKBase.h:
+        * Shared/APIObject.h:
+        * Shared/WebHitTestResult.cpp: Added.
+
+        WebHitTestResult has hovered element information.
+
+        (WebKit::WebHitTestResult::create):
+        (WebKit::WebHitTestResult::Data::encode):
+        (WebKit::WebHitTestResult::Data::decode):
+        * Shared/WebHitTestResult.h: Added.
+        (WebKit::WebHitTestResult::absoluteImageURL):
+        (WebKit::WebHitTestResult::absoluteLinkURL):
+        (WebKit::WebHitTestResult::absoluteMediaURL):
+        (WebKit::WebHitTestResult::linkLabel):
+        (WebKit::WebHitTestResult::linkTitle):
+        (WebKit::WebHitTestResult::WebHitTestResult):
+        (WebKit::WebHitTestResult::type):
+        * UIProcess/API/C/WKAPICast.h:
+        * UIProcess/API/C/WKPage.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::mouseDidMoveOverElement):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * UIProcess/WebUIClient.cpp:
+        (WebKit::WebUIClient::mouseDidMoveOverElement):
+        * UIProcess/WebUIClient.h:
+        * WebKit2.pro:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::mouseDidMoveOverElement):
+        * win/WebKit2.vcproj:
+
 2011-09-15  Adam Roben  <aroben@apple.com>
 
         Add support for attributes on message parameters
index d850774..e943090 100644 (file)
@@ -348,6 +348,8 @@ libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOU
        Source/WebKit2/Shared/WebGeolocationPosition.h \
        Source/WebKit2/Shared/WebGraphicsContext.cpp \
        Source/WebKit2/Shared/WebGraphicsContext.h \
+       Source/WebKit2/Shared/WebHitTestResult.cpp \
+       Source/WebKit2/Shared/WebHitTestResult.h \
        Source/WebKit2/Shared/WebImage.cpp \
        Source/WebKit2/Shared/WebImage.h \
        Source/WebKit2/Shared/WebKeyboardEvent.cpp \
index 1baa872..e89504e 100644 (file)
@@ -84,6 +84,7 @@ typedef const struct OpaqueWKFramePolicyListener* WKFramePolicyListenerRef;
 typedef const struct OpaqueWKGeolocationManager* WKGeolocationManagerRef;
 typedef const struct OpaqueWKGeolocationPermissionRequest* WKGeolocationPermissionRequestRef;
 typedef const struct OpaqueWKGeolocationPosition* WKGeolocationPositionRef;
+typedef const struct OpaqueWKHitTestResult* WKHitTestResultRef;
 typedef const struct OpaqueWKIconDatabase* WKIconDatabaseRef;
 typedef const struct OpaqueWKInspector* WKInspectorRef;
 typedef const struct OpaqueWKKeyValueStorageManager* WKKeyValueStorageManagerRef;
index e5a7eed..7916bf4 100644 (file)
@@ -75,6 +75,7 @@ public:
         TypeFullScreenManager,
         TypeGeolocationManager,
         TypeGeolocationPermissionRequest,
+        TypeHitTestResult,
         TypeGeolocationPosition,
         TypeIconDatabase,
         TypeInspector,
diff --git a/Source/WebKit2/Shared/WebHitTestResult.cpp b/Source/WebKit2/Shared/WebHitTestResult.cpp
new file mode 100644 (file)
index 0000000..f04b847
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "WebHitTestResult.h"
+
+#include "WebCoreArgumentCoders.h"
+
+#include <WebCore/KURL.h>
+#include <wtf/text/WTFString.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PassRefPtr<WebHitTestResult> WebHitTestResult::create(const WebHitTestResult::Data& hitTestResultData)
+{
+    return adoptRef(new WebHitTestResult(hitTestResultData));
+}
+
+void WebHitTestResult::Data::encode(CoreIPC::ArgumentEncoder* encoder) const
+{
+    encoder->encode(absoluteImageURL);
+    encoder->encode(absoluteLinkURL);
+    encoder->encode(absoluteMediaURL);
+    encoder->encode(linkLabel);
+    encoder->encode(linkTitle);
+}
+
+bool WebHitTestResult::Data::decode(CoreIPC::ArgumentDecoder* decoder, WebHitTestResult::Data& hitTestResultData)
+{
+    if (!decoder->decode(hitTestResultData.absoluteImageURL)
+        || !decoder->decode(hitTestResultData.absoluteLinkURL)
+        || !decoder->decode(hitTestResultData.absoluteMediaURL)
+        || !decoder->decode(hitTestResultData.linkLabel)
+        || !decoder->decode(hitTestResultData.linkTitle))
+        return false;
+
+    return true;
+}
+
+} // WebKit
diff --git a/Source/WebKit2/Shared/WebHitTestResult.h b/Source/WebKit2/Shared/WebHitTestResult.h
new file mode 100644 (file)
index 0000000..06f9735
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef WebHitTestResult_h
+#define WebHitTestResult_h
+
+#include "APIObject.h"
+#include <WebCore/HitTestResult.h>
+#include <WebCore/KURL.h>
+#include <wtf/Forward.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+#include <wtf/text/WTFString.h>
+
+namespace CoreIPC {
+class ArgumentDecoder;
+class ArgumentEncoder;
+}
+
+namespace WebKit {
+
+class WebFrame;
+
+class WebHitTestResult : public APIObject {
+public:
+    static const Type APIType = TypeHitTestResult;
+
+    struct Data {
+        String absoluteImageURL;
+        String absoluteLinkURL;
+        String absoluteMediaURL;
+        String linkLabel;
+        String linkTitle;
+
+        void encode(CoreIPC::ArgumentEncoder*) const;
+        static bool decode(CoreIPC::ArgumentDecoder*, WebHitTestResult::Data&);
+    };
+
+    static PassRefPtr<WebHitTestResult> create(const WebHitTestResult::Data&);
+
+    String absoluteImageURL() const { return m_data.absoluteImageURL; }
+    String absoluteLinkURL() const { return m_data.absoluteLinkURL; }
+    String absoluteMediaURL() const { return m_data.absoluteMediaURL; }
+
+    String linkLabel() const { return m_data.linkLabel; }
+    String linkTitle() const { return m_data.linkTitle; }
+
+private:
+    explicit WebHitTestResult(const WebHitTestResult::Data& hitTestResultData)
+        : m_data(hitTestResultData)
+    {
+    }
+
+    virtual Type type() const { return APIType; }
+
+    Data m_data;
+};
+
+} // namespace WebKit
+
+#endif // WebHitTestResult_h
index 81c2f5f..c634f55 100644 (file)
@@ -64,6 +64,7 @@ class WebFramePolicyListenerProxy;
 class WebFrameProxy;
 class WebGeolocationManagerProxy;
 class WebGeolocationPosition;
+class WebHitTestResult;
 class WebIconDatabase;
 class WebInspectorProxy;
 class WebKeyValueStorageManagerProxy;
@@ -94,6 +95,7 @@ WK_ADD_API_MAPPING(WKFrameRef, WebFrameProxy)
 WK_ADD_API_MAPPING(WKGeolocationManagerRef, WebGeolocationManagerProxy)
 WK_ADD_API_MAPPING(WKGeolocationPermissionRequestRef, GeolocationPermissionRequestProxy)
 WK_ADD_API_MAPPING(WKGeolocationPositionRef, WebGeolocationPosition)
+WK_ADD_API_MAPPING(WKHitTestResultRef, WebHitTestResult)
 WK_ADD_API_MAPPING(WKIconDatabaseRef, WebIconDatabase)
 WK_ADD_API_MAPPING(WKKeyValueStorageManagerRef, WebKeyValueStorageManagerProxy)
 WK_ADD_API_MAPPING(WKMediaCacheManagerRef, WebMediaCacheManagerProxy)
index bffb96a..67bfb64 100644 (file)
@@ -168,7 +168,7 @@ typedef void (*WKPageTakeFocusCallback)(WKPageRef page, WKFocusDirection directi
 typedef void (*WKPageFocusCallback)(WKPageRef page, const void *clientInfo);
 typedef void (*WKPageUnfocusCallback)(WKPageRef page, const void *clientInfo);
 typedef void (*WKPageSetStatusTextCallback)(WKPageRef page, WKStringRef text, const void *clientInfo);
-typedef void (*WKPageMouseDidMoveOverElementCallback)(WKPageRef page, WKEventModifiers modifiers, WKTypeRef userData, const void *clientInfo);
+typedef void (*WKPageMouseDidMoveOverElementCallback)(WKPageRef page, WKHitTestResultRef hitTestResult, WKEventModifiers modifiers, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageMissingPluginButtonClickedCallback)(WKPageRef page, WKStringRef mimeType, WKStringRef url, WKStringRef pluginsPageURL, const void* clientInfo);
 typedef void (*WKPageDidNotHandleKeyEventCallback)(WKPageRef page, WKNativeEventPtr event, const void *clientInfo);
 typedef void (*WKPageDidNotHandleWheelEventCallback)(WKPageRef page, WKNativeEventPtr event, const void *clientInfo);
index afb8c39..1a35dc8 100644 (file)
@@ -1997,7 +1997,7 @@ void WebPageProxy::setStatusText(const String& text)
     m_uiClient.setStatusText(this, text);
 }
 
-void WebPageProxy::mouseDidMoveOverElement(uint32_t opaqueModifiers, CoreIPC::ArgumentDecoder* arguments)
+void WebPageProxy::mouseDidMoveOverElement(const WebHitTestResult::Data& hitTestResultData, uint32_t opaqueModifiers, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
     WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
@@ -2006,7 +2006,7 @@ void WebPageProxy::mouseDidMoveOverElement(uint32_t opaqueModifiers, CoreIPC::Ar
 
     WebEvent::Modifiers modifiers = static_cast<WebEvent::Modifiers>(opaqueModifiers);
 
-    m_uiClient.mouseDidMoveOverElement(this, modifiers, userData.get());
+    m_uiClient.mouseDidMoveOverElement(this, hitTestResultData, modifiers, userData.get());
 }
 
 void WebPageProxy::missingPluginButtonClicked(const String& mimeType, const String& url, const String& pluginsPageURL)
index df9a388..5e3c9fb 100644 (file)
@@ -46,6 +46,7 @@
 #include "WebFormClient.h"
 #include "WebFrameProxy.h"
 #include "WebHistoryClient.h"
+#include "WebHitTestResult.h"
 #include "WebLoaderClient.h"
 #include "WebPageContextMenuClient.h"
 #include "WebPolicyClient.h"
@@ -53,6 +54,7 @@
 #include "WebResourceLoadClient.h"
 #include "WebUIClient.h"
 #include <WebCore/DragActions.h>
+#include <WebCore/HitTestResult.h>
 #include <WebCore/ScrollTypes.h>
 #include <WebCore/TextChecking.h>
 #include <wtf/HashMap.h>
@@ -625,7 +627,7 @@ private:
     void runJavaScriptPrompt(uint64_t frameID, const String&, const String&, String& result);
     void shouldInterruptJavaScript(bool& result);
     void setStatusText(const String&);
-    void mouseDidMoveOverElement(uint32_t modifiers, CoreIPC::ArgumentDecoder*);
+    void mouseDidMoveOverElement(const WebHitTestResult::Data& hitTestResultData, uint32_t modifiers, CoreIPC::ArgumentDecoder*);
     void missingPluginButtonClicked(const String& mimeType, const String& url, const String& pluginsPageURL);
     void setToolbarsAreVisible(bool toolbarsAreVisible);
     void getToolbarsAreVisible(bool& toolbarsAreVisible);
index bd8ff1b..cd3922d 100644 (file)
@@ -29,7 +29,7 @@ messages -> WebPageProxy {
     RunJavaScriptConfirm(uint64_t frameID, WTF::String message) -> (bool result)
     RunJavaScriptPrompt(uint64_t frameID, WTF::String message, WTF::String defaultValue) -> (WTF::String result)
     ShouldInterruptJavaScript() -> (bool shouldInterupt)
-    MouseDidMoveOverElement(uint32_t modifiers, WebKit::InjectedBundleUserMessageEncoder userData);
+    MouseDidMoveOverElement(WebKit::WebHitTestResult::Data hitTestResultData, uint32_t modifiers, WebKit::InjectedBundleUserMessageEncoder userData);
     MissingPluginButtonClicked(WTF::String mimeType, WTF::String url, WTF::String pluginsPageURL)
     DidChangeViewportData(WebCore::ViewportArguments arguments)
     DidReceiveEvent(uint32_t type, bool handled)
index 326e2f0..0cbb05d 100644 (file)
@@ -155,12 +155,13 @@ void WebUIClient::setStatusText(WebPageProxy* page, const String& text)
     m_client.setStatusText(toAPI(page), toAPI(text.impl()), m_client.clientInfo);
 }
 
-void WebUIClient::mouseDidMoveOverElement(WebPageProxy* page, WebEvent::Modifiers modifiers, APIObject* userData)
+void WebUIClient::mouseDidMoveOverElement(WebPageProxy* page, const WebHitTestResult::Data& data, WebEvent::Modifiers modifiers, APIObject* userData)
 {
     if (!m_client.mouseDidMoveOverElement)
         return;
 
-    m_client.mouseDidMoveOverElement(toAPI(page), toAPI(modifiers), toAPI(userData), m_client.clientInfo);
+    RefPtr<WebHitTestResult> webHitTestResult = WebHitTestResult::create(data);
+    m_client.mouseDidMoveOverElement(toAPI(page), toAPI(webHitTestResult.get()), toAPI(modifiers), toAPI(userData), m_client.clientInfo);
 }
 
 void WebUIClient::missingPluginButtonClicked(WebPageProxy* page, const String& mimeType, const String& url, const String& pluginsPageURL)
index 470c61a..6df9b0f 100644 (file)
@@ -29,6 +29,7 @@
 #include "APIClient.h"
 #include "WKPage.h"
 #include "WebEvent.h"
+#include "WebHitTestResult.h"
 #include "WebOpenPanelParameters.h"
 #include <wtf/Forward.h>
 #include <wtf/PassRefPtr.h>
@@ -67,7 +68,7 @@ public:
     String runJavaScriptPrompt(WebPageProxy*, const String&, const String&, WebFrameProxy*);
 
     void setStatusText(WebPageProxy*, const String&);
-    void mouseDidMoveOverElement(WebPageProxy*, WebEvent::Modifiers, APIObject*);
+    void mouseDidMoveOverElement(WebPageProxy*, const WebHitTestResult::Data&, WebEvent::Modifiers, APIObject*);
     void missingPluginButtonClicked(WebPageProxy*, const String& mimeType, const String& url, const String& pluginsPageURL);
     
     bool implementsDidNotHandleKeyEvent() const;
index 2d0e6dd..96b210d 100644 (file)
@@ -153,6 +153,7 @@ HEADERS += \
     Shared/WebFindOptions.h \
     Shared/WebGeolocationPosition.h \
     Shared/WebGraphicsContext.h \
+    Shared/WebHitTestResult.h \
     Shared/WebImage.h \
     Shared/WebNavigationDataStore.h \
     Shared/WebNumber.h \
@@ -383,6 +384,7 @@ SOURCES += \
     Shared/WebEventConversion.cpp \
     Shared/WebGeolocationPosition.cpp \
     Shared/WebGraphicsContext.cpp \
+    Shared/WebHitTestResult.cpp \
     Shared/WebKeyboardEvent.cpp \
     Shared/WebImage.cpp \
     Shared/WebMouseEvent.cpp \
index f3fd9bd..6517baf 100644 (file)
                6D8A91A611F0EFD100DD01FE /* com.apple.WebProcess.sb in Resources */ = {isa = PBXBuildFile; fileRef = 6D8A91A511F0EFD100DD01FE /* com.apple.WebProcess.sb */; };
                6EE849C81368D9390038D481 /* WKInspectorMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE849C61368D92D0038D481 /* WKInspectorMac.h */; settings = {ATTRIBUTES = (Public, ); }; };
                762B748D120BC75C00819339 /* WKPreferencesPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 762B7484120BBA2D00819339 /* WKPreferencesPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7801C097142290C400FAF9AF /* WebHitTestResult.cpp in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7801C095142290C400FAF9AF /* WebHitTestResult.cpp */; };
+               7801C098142290C400FAF9AF /* WebHitTestResult.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7801C096142290C400FAF9AF /* WebHitTestResult.h */; };
+               7801C099142290C400FAF9AF /* WebHitTestResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7801C095142290C400FAF9AF /* WebHitTestResult.cpp */; };
+               7801C09A142290C400FAF9AF /* WebHitTestResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 7801C096142290C400FAF9AF /* WebHitTestResult.h */; };
                8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
                8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
                909854EC12BC4E17000AD080 /* WebMemorySampler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 905620E812BC248B000799B6 /* WebMemorySampler.cpp */; };
                        files = (
                                1A50DB66110A3D57000D3FE5 /* WebProcess.app in CopyFiles */,
                                BCDE0ABF13272708001259FB /* PluginProcess.app in CopyFiles */,
+                               7801C097142290C400FAF9AF /* WebHitTestResult.cpp in CopyFiles */,
+                               7801C098142290C400FAF9AF /* WebHitTestResult.h in CopyFiles */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                6EE849C61368D92D0038D481 /* WKInspectorMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKInspectorMac.h; path = mac/WKInspectorMac.h; sourceTree = "<group>"; };
                762B7481120BBA0100819339 /* FontSmoothingLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontSmoothingLevel.h; sourceTree = "<group>"; };
                762B7484120BBA2D00819339 /* WKPreferencesPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPreferencesPrivate.h; sourceTree = "<group>"; };
+               7801C095142290C400FAF9AF /* WebHitTestResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebHitTestResult.cpp; path = Shared/WebHitTestResult.cpp; sourceTree = "<group>"; };
+               7801C096142290C400FAF9AF /* WebHitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebHitTestResult.h; path = Shared/WebHitTestResult.h; sourceTree = "<group>"; };
                8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
                8DC2EF5B0486A6940098B216 /* WebKit2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WebKit2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
                905620E512BC2476000799B6 /* WebMemorySampler.mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebMemorySampler.mac.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                0867D691FE84028FC02AAC07 /* WebKit2 */ = {
                        isa = PBXGroup;
                        children = (
+                               7801C095142290C400FAF9AF /* WebHitTestResult.cpp */,
+                               7801C096142290C400FAF9AF /* WebHitTestResult.h */,
                                B396EA5512E0ED2D00F4FEB7 /* config.h */,
                                C0CE72DB1247E8F700BC0EC4 /* DerivedSources.make */,
                                BC2E6E74114196F000A63B1E /* Platform */,
                                1A9FBA8D13FF04E600DEED67 /* PluginComplexTextInputState.h in Headers */,
                                5272B28B1406985D0096A5D0 /* StatisticsData.h in Headers */,
                                1A2BB6D114117B4D000F35D4 /* PluginProcessConnectionMessages.h in Headers */,
+                               7801C09A142290C400FAF9AF /* WebHitTestResult.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                5D51845513BCF9CC00C7FF4A /* APIClientTraits.cpp in Sources */,
                                5272B28A1406985D0096A5D0 /* StatisticsData.cpp in Sources */,
                                1A2BB6D014117B4D000F35D4 /* PluginProcessConnectionMessageReceiver.cpp in Sources */,
+                               7801C099142290C400FAF9AF /* WebHitTestResult.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index a0dfa0c..568455e 100644 (file)
@@ -496,8 +496,15 @@ void WebChromeClient::mouseDidMoveOverElement(const HitTestResult& hitTestResult
     // Notify the bundle client.
     m_page->injectedBundleUIClient().mouseDidMoveOverElement(m_page, hitTestResult, static_cast<WebEvent::Modifiers>(modifierFlags), userData);
 
+    WebHitTestResult::Data webHitTestResultData;
+    webHitTestResultData.absoluteImageURL = hitTestResult.absoluteImageURL().string();
+    webHitTestResultData.absoluteLinkURL = hitTestResult.absoluteLinkURL().string();
+    webHitTestResultData.absoluteMediaURL = hitTestResult.absoluteMediaURL().string();
+    webHitTestResultData.linkLabel = hitTestResult.textContent();
+    webHitTestResultData.linkTitle = hitTestResult.titleDisplayString();
+
     // Notify the UIProcess.
-    m_page->send(Messages::WebPageProxy::MouseDidMoveOverElement(modifierFlags, InjectedBundleUserMessageEncoder(userData.get())));
+    m_page->send(Messages::WebPageProxy::MouseDidMoveOverElement(webHitTestResultData, modifierFlags, InjectedBundleUserMessageEncoder(userData.get())));
 }
 
 void WebChromeClient::setToolTip(const String& toolTip, TextDirection)
index 9e49854..331ee9f 100755 (executable)
                                >
                        </File>
                        <File
+                               RelativePath="..\Shared\WebHitTestResult.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\Shared\WebHitTestResult.h"
+                               >
+                       </File>
+                       <File
                                RelativePath="..\Shared\WebKeyboardEvent.cpp"
                                >
                        </File>