[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

weinig at apple.com weinig at apple.com
Wed Dec 22 13:45:45 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 39e1fcbcf3dbb10eaa79d6364a43d781b3d9ebee
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Sep 25 02:32:56 2010 +0000

    Implement WebKit2 callback equivalent to -[WebUIDelegate mouseDidMoveOverElement:modifierFlags:]
    <rdar://problem/8359279>
    https://bugs.webkit.org/show_bug.cgi?id=46546
    
    Reviewed by Darin Adler.
    
    WebKit2:
    
    - Adds new WKBundleHitTestResultRef object to represent a content under a cursor.
    - Adds new Bundle and UI level mouseDidMoveOverElement UIClient callbacks, with
      pass through userData to communicate context up to the UIProcess
    
    * Shared/APIObject.h:
    * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
    * UIProcess/API/C/WKPage.h:
    * UIProcess/API/qt/qwkpage.cpp:
    (QWKPage::QWKPage):
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::didReceiveMessage):
    (WebKit::WebPageProxy::mouseDidMoveOverElement):
    * UIProcess/WebPageProxy.h:
    * UIProcess/WebUIClient.cpp:
    (WebKit::WebUIClient::mouseDidMoveOverElement):
    * UIProcess/WebUIClient.h:
    * WebKit2.pro:
    * WebKit2.xcodeproj/project.pbxproj:
    * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
    * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
    * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: Added.
    (WKBundleHitTestResultGetTypeID):
    (WKBundleHitTestResultGetNodeHandle):
    (WKBundleHitTestResultGetFrame):
    (WKBundleHitTestResultCopyAbsoluteLinkURL):
    * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: Added.
    * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
    * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: Added.
    (WebKit::InjectedBundleHitTestResult::create):
    (WebKit::InjectedBundleHitTestResult::nodeHandle):
    (WebKit::InjectedBundleHitTestResult::webFrame):
    (WebKit::InjectedBundleHitTestResult::absoluteLinkURL):
    * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: Added.
    (WebKit::InjectedBundleHitTestResult::coreHitTestResult):
    (WebKit::InjectedBundleHitTestResult::InjectedBundleHitTestResult):
    (WebKit::InjectedBundleHitTestResult::type):
    * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
    (WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
    * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
    * WebProcess/WebCoreSupport/WebChromeClient.cpp:
    (WebKit::WebChromeClient::mouseDidMoveOverElement):
    * win/WebKit2.vcproj:
    
    WebKitTools:
    
    * MiniBrowser/mac/BrowserWindowController.m:
    (mouseDidMoveOverElement):
    (-[BrowserWindowController awakeFromNib]):
    * MiniBrowser/win/BrowserView.cpp:
    (mouseDidMoveOverElement):
    (BrowserView::create):
    * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
    (WTR::InjectedBundlePage::InjectedBundlePage):
    * WebKitTestRunner/TestController.cpp:
    (WTR::createOtherPage):
    (WTR::TestController::initialize):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68322 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 8b91107..af836db 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,54 @@
+2010-09-24  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Darin Adler.
+
+        Implement WebKit2 callback equivalent to -[WebUIDelegate mouseDidMoveOverElement:modifierFlags:]
+        <rdar://problem/8359279>
+        https://bugs.webkit.org/show_bug.cgi?id=46546
+
+        - Adds new WKBundleHitTestResultRef object to represent a content under a cursor.
+        - Adds new Bundle and UI level mouseDidMoveOverElement UIClient callbacks, with
+          pass through userData to communicate context up to the UIProcess
+
+        * Shared/APIObject.h:
+        * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
+        * UIProcess/API/C/WKPage.h:
+        * UIProcess/API/qt/qwkpage.cpp:
+        (QWKPage::QWKPage):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didReceiveMessage):
+        (WebKit::WebPageProxy::mouseDidMoveOverElement):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebUIClient.cpp:
+        (WebKit::WebUIClient::mouseDidMoveOverElement):
+        * UIProcess/WebUIClient.h:
+        * WebKit2.pro:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
+        * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
+        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: Added.
+        (WKBundleHitTestResultGetTypeID):
+        (WKBundleHitTestResultGetNodeHandle):
+        (WKBundleHitTestResultGetFrame):
+        (WKBundleHitTestResultCopyAbsoluteLinkURL):
+        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: Added.
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
+        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: Added.
+        (WebKit::InjectedBundleHitTestResult::create):
+        (WebKit::InjectedBundleHitTestResult::nodeHandle):
+        (WebKit::InjectedBundleHitTestResult::webFrame):
+        (WebKit::InjectedBundleHitTestResult::absoluteLinkURL):
+        * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: Added.
+        (WebKit::InjectedBundleHitTestResult::coreHitTestResult):
+        (WebKit::InjectedBundleHitTestResult::InjectedBundleHitTestResult):
+        (WebKit::InjectedBundleHitTestResult::type):
+        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
+        (WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
+        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::mouseDidMoveOverElement):
+        * win/WebKit2.vcproj:
+
 2010-09-24  Enrica Casucci  <enrica at apple.com>
 
         Build fix.
diff --git a/WebKit2/Shared/APIObject.h b/WebKit2/Shared/APIObject.h
index ab481c9..b46e596 100644
--- a/WebKit2/Shared/APIObject.h
+++ b/WebKit2/Shared/APIObject.h
@@ -66,6 +66,7 @@ public:
         // Bundle types
         TypeBundle,
         TypeBundleFrame,
+        TypeBundleHitTestResult,
         TypeBundleNodeHandle,
         TypeBundlePage,
         TypeBundleRangeHandle,
diff --git a/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h b/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h
index 995e19d..06bc6d2 100644
--- a/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h
+++ b/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h
@@ -66,6 +66,7 @@ enum Kind {
     DidStartProgress,
     DidStartProvisionalLoadForFrame,
     DidValidateMenuItem,
+    MouseDidMoveOverElement,
     SetCursor,
     SetStatusText,
     SetToolTip,
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 042662f..d95ddae 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -151,6 +151,7 @@ typedef void (*WKPageRunJavaScriptAlertCallback)(WKPageRef page, WKStringRef ale
 typedef bool (*WKPageRunJavaScriptConfirmCallback)(WKPageRef page, WKStringRef message, WKFrameRef frame, const void *clientInfo);
 typedef WKStringRef (*WKPageRunJavaScriptPromptCallback)(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, 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 (*WKPageContentsSizeChangedCallback)(WKPageRef page, int width, int height, WKFrameRef frame, const void *clientInfo);
 
 struct WKPageUIClient {
@@ -163,6 +164,7 @@ struct WKPageUIClient {
     WKPageRunJavaScriptConfirmCallback                                  runJavaScriptConfirm;
     WKPageRunJavaScriptPromptCallback                                   runJavaScriptPrompt;
     WKPageSetStatusTextCallback                                         setStatusText;
+    WKPageMouseDidMoveOverElementCallback                               mouseDidMoveOverElement;
     WKPageContentsSizeChangedCallback                                   contentsSizeChanged;
 };
 typedef struct WKPageUIClient WKPageUIClient;
diff --git a/WebKit2/UIProcess/API/qt/qwkpage.cpp b/WebKit2/UIProcess/API/qt/qwkpage.cpp
index c702455..0351516 100644
--- a/WebKit2/UIProcess/API/qt/qwkpage.cpp
+++ b/WebKit2/UIProcess/API/qt/qwkpage.cpp
@@ -272,6 +272,7 @@ QWKPage::QWKPage(WKPageNamespaceRef namespaceRef)
         0,  /* runJavaScriptConfirm */
         0,  /* runJavaScriptPrompt */
         0,  /* setStatusText */
+        0,  /* mouseDidMoveOverElement */
         0   /* contentsSizeChanged */
     };
     WKPageSetPageUIClient(pageRef(), &uiClient);
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index 74c22ea..0ee3451 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -858,6 +858,17 @@ void WebPageProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::M
             m_pageClient->setEditCommandState(commandName, isEnabled, state);
             break;
         }
+        case WebPageProxyMessage::MouseDidMoveOverElement: {
+            uint32_t modifiers;
+            RefPtr<APIObject> userData;
+            WebContextUserMessageDecoder messageDecoder(userData, pageNamespace()->context());
+
+            if (!arguments->decode(CoreIPC::Out(modifiers, messageDecoder)))
+                return;
+
+            mouseDidMoveOverElement(static_cast<WebEvent::Modifiers>(modifiers), userData.get());
+            break;
+        }
         default:
             ASSERT_NOT_REACHED();
             break;
@@ -1142,6 +1153,11 @@ void WebPageProxy::setStatusText(const String& text)
     m_uiClient.setStatusText(this, text);
 }
 
+void WebPageProxy::mouseDidMoveOverElement(WebEvent::Modifiers modifiers, APIObject* userData)
+{
+    m_uiClient.mouseDidMoveOverElement(this, modifiers, userData);
+}
+
 void WebPageProxy::contentsSizeChanged(WebFrameProxy* frame, const WebCore::IntSize& size)
 {
     m_uiClient.contentsSizeChanged(this, size, frame);
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index babc130..730f0fc 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -239,6 +239,7 @@ private:
     bool runJavaScriptConfirm(WebFrameProxy* frame, const String&);
     String runJavaScriptPrompt(WebFrameProxy* frame, const String&, const String&);
     void setStatusText(const String&);
+    void mouseDidMoveOverElement(WebEvent::Modifiers, APIObject*);
     void contentsSizeChanged(WebFrameProxy*, const WebCore::IntSize&);
 
     // Back/Forward list management
diff --git a/WebKit2/UIProcess/WebUIClient.cpp b/WebKit2/UIProcess/WebUIClient.cpp
index 6c86ceb..ec3c525 100644
--- a/WebKit2/UIProcess/WebUIClient.cpp
+++ b/WebKit2/UIProcess/WebUIClient.cpp
@@ -111,6 +111,15 @@ void WebUIClient::setStatusText(WebPageProxy* page, const String& text)
     m_pageUIClient.setStatusText(toRef(page), toRef(text.impl()), m_pageUIClient.clientInfo);
 }
 
+void WebUIClient::mouseDidMoveOverElement(WebPageProxy* page, WebEvent::Modifiers modifiers, APIObject* userData)
+{
+    if (!m_pageUIClient.mouseDidMoveOverElement)
+        return;
+
+    m_pageUIClient.mouseDidMoveOverElement(toRef(page), toRef(modifiers), toRef(userData), m_pageUIClient.clientInfo);
+}
+
+
 void WebUIClient::contentsSizeChanged(WebPageProxy* page, const IntSize& size, WebFrameProxy* frame)
 {
     if (!m_pageUIClient.contentsSizeChanged)
diff --git a/WebKit2/UIProcess/WebUIClient.h b/WebKit2/UIProcess/WebUIClient.h
index 33fe839..4e0595c 100644
--- a/WebKit2/UIProcess/WebUIClient.h
+++ b/WebKit2/UIProcess/WebUIClient.h
@@ -27,6 +27,7 @@
 #define WebUIClient_h
 
 #include "WKPage.h"
+#include "WebEvent.h"
 #include <wtf/Forward.h>
 #include <wtf/PassRefPtr.h>
 
@@ -36,6 +37,7 @@ class IntSize;
 
 namespace WebKit {
 
+class APIObject;
 class WebFrameProxy;
 class WebPageProxy;
 
@@ -51,6 +53,7 @@ public:
     bool runJavaScriptConfirm(WebPageProxy*, const String&, WebFrameProxy*);
     String runJavaScriptPrompt(WebPageProxy*, const String&, const String&, WebFrameProxy*);
     void setStatusText(WebPageProxy*, const String&);
+    void mouseDidMoveOverElement(WebPageProxy*, WebEvent::Modifiers, APIObject*);
     void contentsSizeChanged(WebPageProxy*, const WebCore::IntSize&, WebFrameProxy*);
 
 private:
diff --git a/WebKit2/WebKit2.pro b/WebKit2/WebKit2.pro
index 944b722..9ba7d63 100644
--- a/WebKit2/WebKit2.pro
+++ b/WebKit2/WebKit2.pro
@@ -243,9 +243,11 @@ HEADERS += \
     UIProcess/WebUIClient.h \
     WebProcess/InjectedBundle/API/c/WKBundleBase.h \
     WebProcess/InjectedBundle/API/c/WKBundlePage.h \
+    WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h \
     WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h \
     WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h \
     WebProcess/InjectedBundle/InjectedBundle.h \
+    WebProcess/InjectedBundle/InjectedBundleHitTestResult.h \
     WebProcess/InjectedBundle/InjectedBundlePageFormClient.h \
     WebProcess/InjectedBundle/InjectedBundlePageUIClient.h \
     WebProcess/InjectedBundle/InjectedBundleScriptWorld.h \
@@ -361,9 +363,11 @@ SOURCES += \
     UIProcess/WebProcessManager.cpp \
     UIProcess/WebProcessProxy.cpp \
     UIProcess/WebUIClient.cpp \
+    WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp \
     WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp \
     WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp \
     WebProcess/InjectedBundle/InjectedBundle.cpp \
+    WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp \
     WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp \
     WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp \
     WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp \
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 69d5e1a..dbfa0ad 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -226,6 +226,10 @@
 		BC33DF061238677F00360F3F /* WKSerializedScriptValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A72D5F2E1236F9E800A88B15 /* WKSerializedScriptValue.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		BC33E0D112408E8600360F3F /* InjectedBundleRangeHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = BC33E0CF12408E8600360F3F /* InjectedBundleRangeHandle.h */; };
 		BC33E0D212408E8600360F3F /* InjectedBundleRangeHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC33E0D012408E8600360F3F /* InjectedBundleRangeHandle.cpp */; };
+		BC498618124D10E200D834E1 /* InjectedBundleHitTestResult.h in Headers */ = {isa = PBXBuildFile; fileRef = BC498616124D10E200D834E1 /* InjectedBundleHitTestResult.h */; };
+		BC498619124D10E200D834E1 /* InjectedBundleHitTestResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC498617124D10E200D834E1 /* InjectedBundleHitTestResult.cpp */; };
+		BC49862F124D18C100D834E1 /* WKBundleHitTestResult.h in Headers */ = {isa = PBXBuildFile; fileRef = BC49862D124D18C100D834E1 /* WKBundleHitTestResult.h */; };
+		BC498630124D18C100D834E1 /* WKBundleHitTestResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC49862E124D18C100D834E1 /* WKBundleHitTestResult.cpp */; };
 		BC4BEEAB120A0A5F00FBA0C7 /* InjectedBundleNodeHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = BC4BEEA9120A0A5E00FBA0C7 /* InjectedBundleNodeHandle.h */; };
 		BC4BEEAC120A0A5F00FBA0C7 /* InjectedBundleNodeHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC4BEEAA120A0A5F00FBA0C7 /* InjectedBundleNodeHandle.cpp */; };
 		BC4BEFE1120A1A4C00FBA0C7 /* WKBundleNodeHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = BC4BEFDF120A1A4C00FBA0C7 /* WKBundleNodeHandle.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -647,6 +651,10 @@
 		BC33DE8D12385C3300360F3F /* WKNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKNumber.cpp; sourceTree = "<group>"; };
 		BC33E0CF12408E8600360F3F /* InjectedBundleRangeHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleRangeHandle.h; sourceTree = "<group>"; };
 		BC33E0D012408E8600360F3F /* InjectedBundleRangeHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleRangeHandle.cpp; sourceTree = "<group>"; };
+		BC498616124D10E200D834E1 /* InjectedBundleHitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleHitTestResult.h; sourceTree = "<group>"; };
+		BC498617124D10E200D834E1 /* InjectedBundleHitTestResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleHitTestResult.cpp; sourceTree = "<group>"; };
+		BC49862D124D18C100D834E1 /* WKBundleHitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundleHitTestResult.h; sourceTree = "<group>"; };
+		BC49862E124D18C100D834E1 /* WKBundleHitTestResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundleHitTestResult.cpp; sourceTree = "<group>"; };
 		BC4BEEA9120A0A5E00FBA0C7 /* InjectedBundleNodeHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleNodeHandle.h; sourceTree = "<group>"; };
 		BC4BEEAA120A0A5F00FBA0C7 /* InjectedBundleNodeHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleNodeHandle.cpp; sourceTree = "<group>"; };
 		BC4BEFDF120A1A4C00FBA0C7 /* WKBundleNodeHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundleNodeHandle.h; sourceTree = "<group>"; };
@@ -1420,6 +1428,8 @@
 				BC4BEE96120A091700FBA0C7 /* DOM */,
 				BC204EE011C83E98008F3375 /* InjectedBundle.cpp */,
 				BC204EE111C83E98008F3375 /* InjectedBundle.h */,
+				BC498617124D10E200D834E1 /* InjectedBundleHitTestResult.cpp */,
+				BC498616124D10E200D834E1 /* InjectedBundleHitTestResult.h */,
 				E1EE53E611F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp */,
 				E1EE53DC11F8CF9F00CCBEE4 /* InjectedBundlePageEditorClient.h */,
 				BC14E107120B905E00826C0C /* InjectedBundlePageFormClient.cpp */,
@@ -1461,6 +1471,8 @@
 				BCD25F1611D6BDE100169B0E /* WKBundleFrame.cpp */,
 				BCD25F1511D6BDE100169B0E /* WKBundleFrame.h */,
 				BCF049E411FE20F600F86A58 /* WKBundleFramePrivate.h */,
+				BC49862E124D18C100D834E1 /* WKBundleHitTestResult.cpp */,
+				BC49862D124D18C100D834E1 /* WKBundleHitTestResult.h */,
 				BC204EED11C83EC8008F3375 /* WKBundleInitialize.h */,
 				BC4BEFE0120A1A4C00FBA0C7 /* WKBundleNodeHandle.cpp */,
 				BC4BEFDF120A1A4C00FBA0C7 /* WKBundleNodeHandle.h */,
@@ -1806,6 +1818,8 @@
 				1A0EC7FB124BD3B6007EF4A5 /* PluginProcessMain.h in Headers */,
 				1A0EC906124C0AB8007EF4A5 /* PluginProcessConnection.h in Headers */,
 				1A0EC90F124C0AF5007EF4A5 /* PluginProcessConnectionManager.h in Headers */,
+				BC498618124D10E200D834E1 /* InjectedBundleHitTestResult.h in Headers */,
+				BC49862F124D18C100D834E1 /* WKBundleHitTestResult.h in Headers */,
 				1A043976124D034800FFBFB5 /* PluginProcess.h in Headers */,
 				1A043A09124D11A900FFBFB5 /* WebProcessConnection.h in Headers */,
 				1A043B5E124D5E9D00FFBFB5 /* PluginProcessProxyMessages.h in Headers */,
@@ -1858,7 +1872,6 @@
 			isa = PBXProject;
 			buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "WebKit2" */;
 			compatibilityVersion = "Xcode 3.1";
-			developmentRegion = English;
 			hasScannedForEncodings = 1;
 			knownRegions = (
 				English,
@@ -2085,6 +2098,8 @@
 				1A0EC803124BD41E007EF4A5 /* PluginProcessMainMac.mm in Sources */,
 				1A0EC907124C0AB8007EF4A5 /* PluginProcessConnection.cpp in Sources */,
 				1A0EC910124C0AF5007EF4A5 /* PluginProcessConnectionManager.cpp in Sources */,
+				BC498619124D10E200D834E1 /* InjectedBundleHitTestResult.cpp in Sources */,
+				BC498630124D18C100D834E1 /* WKBundleHitTestResult.cpp in Sources */,
 				1A043977124D034800FFBFB5 /* PluginProcess.cpp in Sources */,
 				1A043A0A124D11A900FFBFB5 /* WebProcessConnection.cpp in Sources */,
 				C06C6095124C144B0001682F /* WebPageCreationParameters.cpp in Sources */,
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h
index 024a691..3f44846 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h
@@ -42,6 +42,7 @@ namespace WebCore {
 namespace WebKit {
 
 class InjectedBundle;
+class InjectedBundleHitTestResult;
 class InjectedBundleNodeHandle;
 class InjectedBundleRangeHandle;
 class InjectedBundleScriptWorld;
@@ -51,6 +52,7 @@ class WebPage;
 template<typename APIType> struct BundleAPITypeInfo { };
 template<> struct BundleAPITypeInfo<WKBundleCSSStyleDeclarationRef>     { typedef WebCore::CSSStyleDeclaration* ImplType; };
 template<> struct BundleAPITypeInfo<WKBundleFrameRef>                   { typedef WebFrame* ImplType; };
+template<> struct BundleAPITypeInfo<WKBundleHitTestResultRef>           { typedef InjectedBundleHitTestResult* ImplType; };
 template<> struct BundleAPITypeInfo<WKBundleNodeHandleRef>              { typedef InjectedBundleNodeHandle* ImplType; };
 template<> struct BundleAPITypeInfo<WKBundlePageRef>                    { typedef WebPage* ImplType; };
 template<> struct BundleAPITypeInfo<WKBundleRangeHandleRef>             { typedef InjectedBundleRangeHandle* ImplType; };
@@ -59,12 +61,13 @@ template<> struct BundleAPITypeInfo<WKBundleScriptWorldRef>             { typede
 
 template<typename ImplType> struct BundleImplTypeInfo { };
 template<> struct BundleImplTypeInfo<InjectedBundle*>                   { typedef WKBundleRef APIType; };
+template<> struct BundleImplTypeInfo<InjectedBundleHitTestResult*>      { typedef WKBundleHitTestResultRef APIType; };
 template<> struct BundleImplTypeInfo<InjectedBundleNodeHandle*>         { typedef WKBundleNodeHandleRef APIType; };
 template<> struct BundleImplTypeInfo<InjectedBundleRangeHandle*>        { typedef WKBundleRangeHandleRef APIType; };
 template<> struct BundleImplTypeInfo<InjectedBundleScriptWorld*>        { typedef WKBundleScriptWorldRef APIType; };
+template<> struct BundleImplTypeInfo<WebCore::CSSStyleDeclaration*>     { typedef WKBundleCSSStyleDeclarationRef APIType; };
 template<> struct BundleImplTypeInfo<WebFrame*>                         { typedef WKBundleFrameRef APIType; };
 template<> struct BundleImplTypeInfo<WebPage*>                          { typedef WKBundlePageRef APIType; };
-template<> struct BundleImplTypeInfo<WebCore::CSSStyleDeclaration*>     { typedef WKBundleCSSStyleDeclarationRef APIType; };
 
 /* Opaque typing convenience methods */
 
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBase.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBase.h
index 8d18ec4..c2d0a80 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBase.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBase.h
@@ -28,6 +28,7 @@
 
 typedef const struct OpaqueWKBundle* WKBundleRef;
 typedef const struct OpaqueWKBundleFrame* WKBundleFrameRef;
+typedef const struct OpaqueWKBundleHitTestResult* WKBundleHitTestResultRef;
 typedef const struct OpaqueWKBundleNodeHandle* WKBundleNodeHandleRef;
 typedef const struct OpaqueWKBundlePage* WKBundlePageRef;
 typedef const struct OpaqueWKBundleRangeHandle* WKBundleRangeHandleRef;
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp
new file mode 100644
index 0000000..d4665e5
--- /dev/null
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 Apple 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 "WKBundleHitTestResult.h"
+
+#include "InjectedBundleHitTestResult.h"
+#include "InjectedBundleNodeHandle.h"
+#include "WKAPICast.h"
+#include "WKBundleAPICast.h"
+
+using namespace WebKit;
+
+WKTypeID WKBundleHitTestResultGetTypeID()
+{
+    return toRef(InjectedBundleHitTestResult::APIType);
+}
+
+WKBundleNodeHandleRef WKBundleHitTestResultGetNodeHandle(WKBundleHitTestResultRef hitTestResultRef)
+{
+    RefPtr<InjectedBundleNodeHandle> nodeHandle = toWK(hitTestResultRef)->nodeHandle();
+    return toRef(nodeHandle.get());
+}
+
+WKBundleFrameRef WKBundleHitTestResultGetFrame(WKBundleHitTestResultRef hitTestResultRef)
+{
+    return toRef(toWK(hitTestResultRef)->webFrame());
+}
+
+WKURLRef WKBundleHitTestResultCopyAbsoluteLinkURL(WKBundleHitTestResultRef hitTestResultRef)
+{
+    return toCopiedURLRef(toWK(hitTestResultRef)->absoluteLinkURL());
+}
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h
new file mode 100644
index 0000000..e5bf621
--- /dev/null
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2010 Apple 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 WKBundleHitTestResult_h
+#define WKBundleHitTestResult_h
+
+#include <WebKit2/WKBase.h>
+#include <WebKit2/WKBundleBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT WKTypeID WKBundleHitTestResultGetTypeID();
+
+WK_EXPORT WKBundleNodeHandleRef WKBundleHitTestResultGetNodeHandle(WKBundleHitTestResultRef hitTestResult);
+WK_EXPORT WKBundleFrameRef WKBundleHitTestResultGetFrame(WKBundleHitTestResultRef hitTestResult);
+WK_EXPORT WKURLRef WKBundleHitTestResultCopyAbsoluteLinkURL(WKBundleHitTestResultRef hitTestResult);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKBundleHitTestResult_h */
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
index f3aa83b..10869e0 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
@@ -118,6 +118,8 @@ typedef void (*WKBundlePageWillSetStatusbarTextCallback)(WKBundlePageRef page, W
 typedef void (*WKBundlePageWillRunJavaScriptAlertCallback)(WKBundlePageRef page, WKStringRef alertText, WKBundleFrameRef frame, const void *clientInfo);
 typedef void (*WKBundlePageWillRunJavaScriptConfirmCallback)(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo);
 typedef void (*WKBundlePageWillRunJavaScriptPromptCallback)(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void *clientInfo);
+typedef void (*WKBundlePageWillRunJavaScriptPromptCallback)(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void *clientInfo);
+typedef void (*WKBundlePageMouseDidMoveOverElementCallback)(WKBundlePageRef page, WKBundleHitTestResultRef hitTestResult, WKTypeRef* userData, const void *clientInfo);
 
 struct WKBundlePageUIClient {
     int                                                                 version;
@@ -127,6 +129,7 @@ struct WKBundlePageUIClient {
     WKBundlePageWillRunJavaScriptAlertCallback                          willRunJavaScriptAlert;
     WKBundlePageWillRunJavaScriptConfirmCallback                        willRunJavaScriptConfirm;
     WKBundlePageWillRunJavaScriptPromptCallback                         willRunJavaScriptPrompt;
+    WKBundlePageMouseDidMoveOverElementCallback                         mouseDidMoveOverElement;
 };
 typedef struct WKBundlePageUIClient WKBundlePageUIClient;
 
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp b/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp
new file mode 100644
index 0000000..ed3ca3c
--- /dev/null
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010 Apple 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 "InjectedBundleHitTestResult.h"
+
+#include "InjectedBundleNodeHandle.h"
+#include "WebFrame.h"
+#include "WebFrameLoaderClient.h"
+#include <WebCore/Document.h>
+#include <WebCore/Frame.h>
+#include <WebCore/FrameLoader.h>
+#include <WebCore/KURL.h>
+#include <wtf/text/WTFString.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PassRefPtr<InjectedBundleHitTestResult> InjectedBundleHitTestResult::create(const WebCore::HitTestResult& hitTestResult)
+{
+    return adoptRef(new InjectedBundleHitTestResult(hitTestResult));
+}
+
+PassRefPtr<InjectedBundleNodeHandle> InjectedBundleHitTestResult::nodeHandle() const
+{
+    return InjectedBundleNodeHandle::getOrCreate(m_hitTestResult.innerNonSharedNode());
+}
+
+WebFrame* InjectedBundleHitTestResult::webFrame() const
+{
+    Node* node = m_hitTestResult.innerNonSharedNode();
+    if (!node)
+        return 0;
+
+    Document* document = node->document();
+    if (!document)
+        return 0;
+
+    Frame* frame = document->frame();
+    if (!frame)
+        return 0;
+
+    return static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
+}
+
+const String& InjectedBundleHitTestResult::absoluteLinkURL() const
+{
+    return m_hitTestResult.absoluteLinkURL().string();
+}
+
+} // WebKit
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.h b/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.h
new file mode 100644
index 0000000..7065b08
--- /dev/null
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2010 Apple 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 InjectedBundleHitTestResult_h
+#define InjectedBundleHitTestResult_h
+
+#include "APIObject.h"
+#include <WebCore/HitTestResult.h>
+#include <wtf/Forward.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebKit {
+
+class InjectedBundleNodeHandle;
+class WebFrame;
+
+class InjectedBundleHitTestResult : public APIObject {
+public:
+    static const Type APIType = TypeBundleHitTestResult;
+
+    static PassRefPtr<InjectedBundleHitTestResult> create(const WebCore::HitTestResult&);
+
+    const WebCore::HitTestResult& coreHitTestResult() const { return m_hitTestResult; }
+
+    PassRefPtr<InjectedBundleNodeHandle> nodeHandle() const; 
+    WebFrame* webFrame() const;
+    const String& absoluteLinkURL() const;
+
+private:
+    explicit InjectedBundleHitTestResult(const WebCore::HitTestResult& hitTestResult)
+        : m_hitTestResult(hitTestResult)
+    {
+    }
+
+    virtual Type type() const { return APIType; }
+
+    WebCore::HitTestResult m_hitTestResult;
+};
+
+} // namespace WebKit
+
+#endif // InjectedBundleHitTestResult_h
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
index 9c461d4..6b6437b 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
@@ -25,6 +25,7 @@
 
 #include "InjectedBundlePageUIClient.h"
 
+#include "InjectedBundleHitTestResult.h"
 #include "WKAPICast.h"
 #include "WKBundleAPICast.h"
 #include <wtf/text/WTFString.h>
@@ -76,4 +77,16 @@ void InjectedBundlePageUIClient::willRunJavaScriptPrompt(WebPage* page, const St
         m_client.willRunJavaScriptPrompt(toRef(page), toRef(message.impl()), toRef(defaultValue.impl()), toRef(frame), m_client.clientInfo);
 }
 
+void InjectedBundlePageUIClient::mouseDidMoveOverElement(WebPage* page, const HitTestResult& coreHitTestResult, RefPtr<APIObject>& userData)
+{
+    if (!m_client.mouseDidMoveOverElement)
+        return;
+
+    RefPtr<InjectedBundleHitTestResult> hitTestResult = InjectedBundleHitTestResult::create(coreHitTestResult);
+
+    WKTypeRef userDataToPass = 0;
+    m_client.mouseDidMoveOverElement(toRef(page), toRef(hitTestResult.get()), &userDataToPass, m_client.clientInfo);
+    userData = adoptRef(toWK(userDataToPass));
+}
+
 } // namespace WebKit
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h
index da862e2..56ec047 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h
@@ -29,8 +29,13 @@
 #include "WKBundlePage.h"
 #include <wtf/Forward.h>
 
+namespace WebCore {
+    class HitTestResult;
+}
+
 namespace WebKit {
 
+class APIObject;
 class WebFrame;
 class WebPage;
 
@@ -44,6 +49,7 @@ public:
     void willRunJavaScriptAlert(WebPage*, const String&, WebFrame*);
     void willRunJavaScriptConfirm(WebPage*, const String&, WebFrame*);
     void willRunJavaScriptPrompt(WebPage*, const String&, const String&, WebFrame*);
+    void mouseDidMoveOverElement(WebPage*, const WebCore::HitTestResult&, RefPtr<APIObject>& userData);
 
 private:
     WKBundlePageUIClient m_client;
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
index afb0962..74e2365 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
@@ -30,6 +30,7 @@
 #include "NotImplemented.h"
 
 #include "DrawingArea.h"
+#include "InjectedBundleUserMessageCoders.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebFrame.h"
 #include "WebFrameLoaderClient.h"
@@ -356,9 +357,15 @@ void WebChromeClient::scrollbarsModeDidChange() const
     notImplemented();
 }
 
-void WebChromeClient::mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags)
+void WebChromeClient::mouseDidMoveOverElement(const HitTestResult& hitTestResult, unsigned modifierFlags)
 {
-    notImplemented();
+    RefPtr<APIObject> userData;
+
+    // Notify the bundle client.
+    m_page->injectedBundleUIClient().mouseDidMoveOverElement(m_page, hitTestResult, userData);
+
+    // Notify the UIProcess.
+    WebProcess::shared().connection()->send(WebPageProxyMessage::MouseDidMoveOverElement, m_page->pageID(), CoreIPC::In(modifierFlags, InjectedBundleUserMessageEncoder(userData.get())));
 }
 
 void WebChromeClient::setToolTip(const String& toolTip, TextDirection)
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index e470112..3e64453 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -836,6 +836,14 @@
 					>
 				</File>
 				<File
+					RelativePath="..\WebProcess\InjectedBundle\InjectedBundleHitTestResult.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\WebProcess\InjectedBundle\InjectedBundleHitTestResult.h"
+					>
+				</File>
+				<File
 					RelativePath="..\WebProcess\InjectedBundle\InjectedBundlePageEditorClient.cpp"
 					>
 				</File>
@@ -914,6 +922,14 @@
 							>
 						</File>
 						<File
+							RelativePath="..\WebProcess\InjectedBundle\API\c\WKBundleHitTestResult.cpp"
+							>
+						</File>
+						<File
+							RelativePath="..\WebProcess\InjectedBundle\API\c\WKBundleHitTestResult.h"
+							>
+						</File>
+						<File
 							RelativePath="..\WebProcess\InjectedBundle\API\c\WKBundleInitialize.h"
 							>
 						</File>
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 4bb3194..995f1be 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,23 @@
+2010-09-24  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Darin Adler.
+
+        Implement WebKit2 callback equivalent to -[WebUIDelegate mouseDidMoveOverElement:modifierFlags:]
+        <rdar://problem/8359279>
+        https://bugs.webkit.org/show_bug.cgi?id=46546
+
+        * MiniBrowser/mac/BrowserWindowController.m:
+        (mouseDidMoveOverElement):
+        (-[BrowserWindowController awakeFromNib]):
+        * MiniBrowser/win/BrowserView.cpp:
+        (mouseDidMoveOverElement):
+        (BrowserView::create):
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::InjectedBundlePage::InjectedBundlePage):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::createOtherPage):
+        (WTR::TestController::initialize):
+
 2010-09-24  Mihai Parparita  <mihaip at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
index 32032c8..06de900 100644
--- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
+++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
@@ -474,6 +474,11 @@ static void setStatusText(WKPageRef page, WKStringRef text, const void* clientIn
     LOG(@"setStatusText");
 }
 
+static void mouseDidMoveOverElement(WKPageRef page, WKEventModifiers modifiers, WKTypeRef userData, const void *clientInfo)
+{
+    LOG(@"mouseDidMoveOverElement");
+}
+
 static void contentsSizeChanged(WKPageRef page, int width, int height, WKFrameRef frame, const void *clientInfo)
 {
     LOG(@"contentsSizeChanged");
@@ -531,6 +536,7 @@ static void contentsSizeChanged(WKPageRef page, int width, int height, WKFrameRe
         runJavaScriptConfirm,
         runJavaScriptPrompt,
         setStatusText,
+        mouseDidMoveOverElement,
         contentsSizeChanged
     };
     WKPageSetPageUIClient(_webView.pageRef, &uiClient);
diff --git a/WebKitTools/MiniBrowser/win/BrowserView.cpp b/WebKitTools/MiniBrowser/win/BrowserView.cpp
index 5e90fe2..f6a7070 100644
--- a/WebKitTools/MiniBrowser/win/BrowserView.cpp
+++ b/WebKitTools/MiniBrowser/win/BrowserView.cpp
@@ -74,6 +74,10 @@ static void setStatusText(WKPageRef page, WKStringRef text, const void* clientIn
 {
 }
 
+static void mouseDidMoveOverElement(WKPageRef page, WKEventModifiers modifiers, WKTypeRef userData, const void *clientInfo)
+{
+}
+
 static void contentsSizeChanged(WKPageRef page, int width, int height, WKFrameRef frame, const void *clientInfo)
 {
 }
@@ -104,6 +108,7 @@ void BrowserView::create(RECT webViewRect, BrowserWindow* parentWindow)
         runJavaScriptConfirm,
         runJavaScriptPrompt,
         setStatusText,
+        mouseDidMoveOverElement,
         contentsSizeChanged
     };
 
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index 581a9bc..32b92cb 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -187,7 +187,8 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
         willSetStatusbarText,
         willRunJavaScriptAlert,
         willRunJavaScriptConfirm,
-        willRunJavaScriptPrompt
+        willRunJavaScriptPrompt,
+        0 /*mouseDidMoveOverElement*/
     };
     WKBundlePageSetUIClient(m_page, &uiClient);
 
diff --git a/WebKitTools/WebKitTestRunner/TestController.cpp b/WebKitTools/WebKitTestRunner/TestController.cpp
index d3e2bdd..842dc81 100644
--- a/WebKitTools/WebKitTestRunner/TestController.cpp
+++ b/WebKitTools/WebKitTestRunner/TestController.cpp
@@ -84,6 +84,7 @@ static WKPageRef createOtherPage(WKPageRef oldPage, const void*)
         0,
         0,
         0,
+        0,
         0
     };
     WKPageSetPageUIClient(newPage, &otherPageUIClient);
@@ -163,6 +164,7 @@ void TestController::initialize(int argc, const char* argv[])
         0,
         0,
         0,
+        0,
         0
     };
     WKPageSetPageUIClient(m_mainWebView->page(), &pageUIClient);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list