Diff
Modified: trunk/Source/WebKit2/ChangeLog (109749 => 109750)
--- trunk/Source/WebKit2/ChangeLog 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/ChangeLog 2012-03-05 16:34:29 UTC (rev 109750)
@@ -1,3 +1,46 @@
+2012-03-05 Carlos Garcia Campos <cgar...@igalia.com>
+
+ [WK2] WKPageGetContextMenuFromProposedContextMenuCallback should pass a HitTestResult
+ https://bugs.webkit.org/show_bug.cgi?id=77208
+
+ Reviewed by Anders Carlsson.
+
+ A HitTestResultData is now passed to ShowContextMenu WebPageProxy
+ message instead of the ContextMenuState. ContextMenu client has
+ been updated to pass the HitTestResult to the
+ getContextMenuFromProposedMenu callback.
+
+ * GNUmakefile.am: Remove ContextMenuState.h.
+ * Shared/APIClientTraits.h:
+ * Shared/ContextMenuState.h: Removed.
+ * Shared/WebHitTestResult.h:
+ (WebKit::WebHitTestResult::Data::Data): Add constructor that takes
+ a WebCore::HitTestResult.
+ * UIProcess/API/C/WKPage.h: Add HitTestResult parameter to
+ getContextMenuFromProposedMenu callback and deprecate the old
+ version.
+ * UIProcess/WebPageContextMenuClient.cpp:
+ (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
+ Pass a HitTestResult to getContextMenuFromProposedMenu or use the
+ deprecated one if client version is an old one.
+ * UIProcess/WebPageContextMenuClient.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::showContextMenu):
+ (WebKit::WebPageProxy::internalShowContextMenu): Save the
+ WebHitTestResult::Data to use it for handling context menu actions.
+ (WebKit::WebPageProxy::contextMenuItemSelected): Use the saved
+ WebHitTestResult::Data.
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * WebKit2.xcodeproj/project.pbxproj: Remove ContextMenuState.h.
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::mouseDidMoveOverElement): Use the new
+ WebHitTestResult::Data constructor that takes a WebCore::HitTestResult.
+ * WebProcess/WebPage/WebContextMenu.cpp:
+ (WebKit::WebContextMenu::show): Create a WebHitTestResult::Data
+ instead of a ContextMenuState and pass it to ShowContextMenu message.
+ * win/WebKit2.vcproj: ContextMenuState.h.
+
2012-03-05 No'am Rosenthal <noam.rosent...@nokia.com>
[Qt] [WK2] Support threaded renderer in WK2
Modified: trunk/Source/WebKit2/GNUmakefile.am (109749 => 109750)
--- trunk/Source/WebKit2/GNUmakefile.am 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/GNUmakefile.am 2012-03-05 16:34:29 UTC (rev 109750)
@@ -243,7 +243,6 @@
Source/WebKit2/PluginProcess/WebProcessConnection.h \
Source/WebKit2/PluginProcess/gtk/PluginControllerProxyGtk.cpp \
Source/WebKit2/PluginProcess/gtk/PluginProcessGtk.cpp \
- Source/WebKit2/Shared/ContextMenuState.h \
Source/WebKit2/Shared/DragControllerAction.h \
Source/WebKit2/Shared/FontInfo.h \
Source/WebKit2/Shared/HTTPCookieAcceptPolicy.h \
Modified: trunk/Source/WebKit2/Shared/APIClientTraits.h (109749 => 109750)
--- trunk/Source/WebKit2/Shared/APIClientTraits.h 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/Shared/APIClientTraits.h 2012-03-05 16:34:29 UTC (rev 109750)
@@ -45,7 +45,7 @@
};
template<> struct APIClientTraits<WKPageContextMenuClient> {
- static const size_t interfaceSizesByVersion[2];
+ static const size_t interfaceSizesByVersion[3];
};
template<> struct APIClientTraits<WKPageLoaderClient> {
Deleted: trunk/Source/WebKit2/Shared/ContextMenuState.h (109749 => 109750)
--- trunk/Source/WebKit2/Shared/ContextMenuState.h 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/Shared/ContextMenuState.h 2012-03-05 16:34:29 UTC (rev 109750)
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2011 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 ContextMenuState_h
-#define ContextMenuState_h
-
-#include "WebCoreArgumentCoders.h"
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-
-struct ContextMenuState {
- String absoluteLinkURLString;
- String absoluteImageURLString;
-
- void encode(CoreIPC::ArgumentEncoder* encoder) const
- {
- encoder->encode(absoluteLinkURLString);
- encoder->encode(absoluteImageURLString);
- }
-
- static bool decode(CoreIPC::ArgumentDecoder* decoder, ContextMenuState& result)
- {
- if (!decoder->decode(result.absoluteLinkURLString))
- return false;
- if (!decoder->decode(result.absoluteImageURLString))
- return false;
-
- return true;
- }
-};
-
-} // namespace WebKit
-
-#endif // ContextMenuState_h
Modified: trunk/Source/WebKit2/Shared/WebHitTestResult.h (109749 => 109750)
--- trunk/Source/WebKit2/Shared/WebHitTestResult.h 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/Shared/WebHitTestResult.h 2012-03-05 16:34:29 UTC (rev 109750)
@@ -49,6 +49,20 @@
String linkLabel;
String linkTitle;
+ Data()
+ {
+ }
+
+ explicit Data(const WebCore::HitTestResult& hitTestResult)
+ : absoluteImageURL(hitTestResult.absoluteImageURL().string())
+ , absolutePDFURL(hitTestResult.absolutePDFURL().string())
+ , absoluteLinkURL(hitTestResult.absoluteLinkURL().string())
+ , absoluteMediaURL(hitTestResult.absoluteMediaURL().string())
+ , linkLabel(hitTestResult.textContent())
+ , linkTitle(hitTestResult.titleDisplayString())
+ {
+ }
+
void encode(CoreIPC::ArgumentEncoder*) const;
static bool decode(CoreIPC::ArgumentDecoder*, WebHitTestResult::Data&);
};
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.h (109749 => 109750)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.h 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.h 2012-03-05 16:34:29 UTC (rev 109750)
@@ -285,24 +285,29 @@
};
// ContextMenu client
-typedef void (*WKPageGetContextMenuFromProposedContextMenuCallback)(WKPageRef page, WKArrayRef proposedMenu, WKArrayRef* newMenu, WKTypeRef userData, const void* clientInfo);
+typedef void (*WKPageGetContextMenuFromProposedContextMenuCallback)(WKPageRef page, WKArrayRef proposedMenu, WKArrayRef* newMenu, WKHitTestResultRef hitTestResult, WKTypeRef userData, const void* clientInfo);
typedef void (*WKPageCustomContextMenuItemSelectedCallback)(WKPageRef page, WKContextMenuItemRef contextMenuItem, const void* clientInfo);
typedef void (*WKPageContextMenuDismissedCallback)(WKPageRef page, const void* clientInfo);
+// Deprecated
+typedef void (*WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0)(WKPageRef page, WKArrayRef proposedMenu, WKArrayRef* newMenu, WKTypeRef userData, const void* clientInfo);
struct WKPageContextMenuClient {
- int version;
- const void * clientInfo;
-
+ int version;
+ const void * clientInfo;
+
// Version 0
- WKPageGetContextMenuFromProposedContextMenuCallback getContextMenuFromProposedMenu;
- WKPageCustomContextMenuItemSelectedCallback customContextMenuItemSelected;
-
+ WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0 getContextMenuFromProposedMenu_deprecatedForUseWithV0;
+ WKPageCustomContextMenuItemSelectedCallback customContextMenuItemSelected;
+
// Version 1
- WKPageContextMenuDismissedCallback contextMenuDismissed;
+ WKPageContextMenuDismissedCallback contextMenuDismissed;
+
+ // Version 2
+ WKPageGetContextMenuFromProposedContextMenuCallback getContextMenuFromProposedMenu;
};
typedef struct WKPageContextMenuClient WKPageContextMenuClient;
-enum { kWKPageContextMenuClientCurrentVersion = 1 };
+enum { kWKPageContextMenuClientCurrentVersion = 2 };
WK_EXPORT WKTypeID WKPageGetTypeID();
Modified: trunk/Source/WebKit2/UIProcess/WebPageContextMenuClient.cpp (109749 => 109750)
--- trunk/Source/WebKit2/UIProcess/WebPageContextMenuClient.cpp 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/UIProcess/WebPageContextMenuClient.cpp 2012-03-05 16:34:29 UTC (rev 109750)
@@ -34,11 +34,14 @@
namespace WebKit {
-bool WebPageContextMenuClient::getContextMenuFromProposedMenu(WebPageProxy* page, const Vector<WebContextMenuItemData>& proposedMenuVector, Vector<WebContextMenuItemData>& customMenu, APIObject* userData)
+bool WebPageContextMenuClient::getContextMenuFromProposedMenu(WebPageProxy* page, const Vector<WebContextMenuItemData>& proposedMenuVector, Vector<WebContextMenuItemData>& customMenu, const WebHitTestResult::Data& hitTestResultData, APIObject* userData)
{
- if (!m_client.getContextMenuFromProposedMenu)
+ if (!m_client.getContextMenuFromProposedMenu && !m_client.getContextMenuFromProposedMenu_deprecatedForUseWithV0)
return false;
-
+
+ if (m_client.version == kWKPageContextMenuClientCurrentVersion && !m_client.getContextMenuFromProposedMenu)
+ return false;
+
unsigned size = proposedMenuVector.size();
RefPtr<MutableArray> proposedMenu = MutableArray::create();
proposedMenu->reserveCapacity(size);
@@ -46,7 +49,12 @@
proposedMenu->append(WebContextMenuItem::create(proposedMenuVector[i]).get());
WKArrayRef newMenu = 0;
- m_client.getContextMenuFromProposedMenu(toAPI(page), toAPI(proposedMenu.get()), &newMenu, toAPI(userData), m_client.clientInfo);
+ if (m_client.version == kWKPageContextMenuClientCurrentVersion) {
+ RefPtr<WebHitTestResult> webHitTestResult = WebHitTestResult::create(hitTestResultData);
+ m_client.getContextMenuFromProposedMenu(toAPI(page), toAPI(proposedMenu.get()), &newMenu, toAPI(webHitTestResult.get()), toAPI(userData), m_client.clientInfo);
+ } else
+ m_client.getContextMenuFromProposedMenu_deprecatedForUseWithV0(toAPI(page), toAPI(proposedMenu.get()), &newMenu, toAPI(userData), m_client.clientInfo);
+
RefPtr<ImmutableArray> array = adoptRef(toImpl(newMenu));
customMenu.clear();
Modified: trunk/Source/WebKit2/UIProcess/WebPageContextMenuClient.h (109749 => 109750)
--- trunk/Source/WebKit2/UIProcess/WebPageContextMenuClient.h 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/UIProcess/WebPageContextMenuClient.h 2012-03-05 16:34:29 UTC (rev 109750)
@@ -27,6 +27,7 @@
#define WebPageContextMenuClient_h
#include "APIClient.h"
+#include "WebHitTestResult.h"
#include "WKPage.h"
#include <wtf/Vector.h>
@@ -38,7 +39,7 @@
class WebPageContextMenuClient : public APIClient<WKPageContextMenuClient, kWKPageContextMenuClientCurrentVersion> {
public:
- bool getContextMenuFromProposedMenu(WebPageProxy*, const Vector<WebContextMenuItemData>& proposedMenu, Vector<WebContextMenuItemData>& customMenu, APIObject* userData);
+ bool getContextMenuFromProposedMenu(WebPageProxy*, const Vector<WebContextMenuItemData>& proposedMenu, Vector<WebContextMenuItemData>& customMenu, const WebHitTestResult::Data&, APIObject* userData);
void customContextMenuItemSelected(WebPageProxy*, const WebContextMenuItemData&);
void contextMenuDismissed(WebPageProxy*);
};
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (109749 => 109750)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2012-03-05 16:34:29 UTC (rev 109750)
@@ -2625,22 +2625,22 @@
m_activePopupMenu = 0;
}
-void WebPageProxy::showContextMenu(const IntPoint& menuLocation, const ContextMenuState& contextMenuState, const Vector<WebContextMenuItemData>& proposedItems, CoreIPC::ArgumentDecoder* arguments)
+void WebPageProxy::showContextMenu(const IntPoint& menuLocation, const WebHitTestResult::Data& hitTestResultData, const Vector<WebContextMenuItemData>& proposedItems, CoreIPC::ArgumentDecoder* arguments)
{
- internalShowContextMenu(menuLocation, contextMenuState, proposedItems, arguments);
+ internalShowContextMenu(menuLocation, hitTestResultData, proposedItems, arguments);
// No matter the result of internalShowContextMenu, always notify the WebProcess that the menu is hidden so it starts handling mouse events again.
process()->send(Messages::WebPage::ContextMenuHidden(), m_pageID);
}
-void WebPageProxy::internalShowContextMenu(const IntPoint& menuLocation, const ContextMenuState& contextMenuState, const Vector<WebContextMenuItemData>& proposedItems, CoreIPC::ArgumentDecoder* arguments)
+void WebPageProxy::internalShowContextMenu(const IntPoint& menuLocation, const WebHitTestResult::Data& hitTestResultData, const Vector<WebContextMenuItemData>& proposedItems, CoreIPC::ArgumentDecoder* arguments)
{
RefPtr<APIObject> userData;
WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
if (!arguments->decode(messageDecoder))
return;
- m_activeContextMenuState = contextMenuState;
+ m_activeContextMenuHitTestResultData = hitTestResultData;
if (m_activeContextMenu) {
m_activeContextMenu->hideContextMenu();
@@ -2654,7 +2654,7 @@
// Give the PageContextMenuClient one last swipe at changing the menu.
Vector<WebContextMenuItemData> items;
- if (!m_contextMenuClient.getContextMenuFromProposedMenu(this, proposedItems, items, userData.get()))
+ if (!m_contextMenuClient.getContextMenuFromProposedMenu(this, proposedItems, items, hitTestResultData, userData.get()))
m_activeContextMenu->showContextMenu(menuLocation, proposedItems);
else
m_activeContextMenu->showContextMenu(menuLocation, items);
@@ -2706,11 +2706,11 @@
}
#endif
if (item.action() == ContextMenuItemTagDownloadImageToDisk) {
- m_process->context()->download(this, KURL(KURL(), m_activeContextMenuState.absoluteImageURLString));
+ m_process->context()->download(this, KURL(KURL(), m_activeContextMenuHitTestResultData.absoluteImageURL));
return;
}
if (item.action() == ContextMenuItemTagDownloadLinkToDisk) {
- m_process->context()->download(this, KURL(KURL(), m_activeContextMenuState.absoluteLinkURLString));
+ m_process->context()->download(this, KURL(KURL(), m_activeContextMenuHitTestResultData.absoluteLinkURL));
return;
}
if (item.action() == ContextMenuItemTagCheckSpellingWhileTyping) {
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (109749 => 109750)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2012-03-05 16:34:29 UTC (rev 109750)
@@ -28,7 +28,6 @@
#include "APIObject.h"
#include "Connection.h"
-#include "ContextMenuState.h"
#include "DragControllerAction.h"
#include "DrawingAreaProxy.h"
#include "EditorState.h"
@@ -46,6 +45,7 @@
#include "WKBase.h"
#include "WKPagePrivate.h"
#include "WebContextMenuItemData.h"
+#include "WebCoreArgumentCoders.h"
#include "WebFindClient.h"
#include "WebFormClient.h"
#include "WebFrameProxy.h"
@@ -782,8 +782,8 @@
#endif
// Context Menu.
- void showContextMenu(const WebCore::IntPoint& menuLocation, const ContextMenuState&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*);
- void internalShowContextMenu(const WebCore::IntPoint& menuLocation, const ContextMenuState&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*);
+ void showContextMenu(const WebCore::IntPoint& menuLocation, const WebHitTestResult::Data&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*);
+ void internalShowContextMenu(const WebCore::IntPoint& menuLocation, const WebHitTestResult::Data&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*);
// Search popup results
void saveRecentSearches(const String&, const Vector<String>&);
@@ -913,7 +913,7 @@
RefPtr<WebPopupMenuProxy> m_activePopupMenu;
RefPtr<WebContextMenuProxy> m_activeContextMenu;
- ContextMenuState m_activeContextMenuState;
+ WebHitTestResult::Data m_activeContextMenuHitTestResultData;
RefPtr<WebOpenPanelResultListenerProxy> m_openPanelResultListener;
GeolocationPermissionRequestManagerProxy m_geolocationPermissionRequestManager;
NotificationPermissionRequestManagerProxy m_notificationPermissionRequestManager;
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (109749 => 109750)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2012-03-05 16:34:29 UTC (rev 109750)
@@ -194,7 +194,7 @@
#endif
# ContextMenu messages
- ShowContextMenu(WebCore::IntPoint menuLocation, WebKit::ContextMenuState state, Vector<WebKit::WebContextMenuItemData> items, WebKit::InjectedBundleUserMessageEncoder userData)
+ ShowContextMenu(WebCore::IntPoint menuLocation, WebKit::WebHitTestResult::Data hitTestResultData, Vector<WebKit::WebContextMenuItemData> items, WebKit::InjectedBundleUserMessageEncoder userData)
# Authentication messages
CanAuthenticateAgainstProtectionSpaceInFrame(uint64_t frameID, WebCore::ProtectionSpace protectionSpace) -> (bool canAuthenticate)
Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (109749 => 109750)
--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2012-03-05 16:34:29 UTC (rev 109750)
@@ -80,7 +80,6 @@
1A24BF3A120896A600FBB059 /* SharedMemoryMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A24BF39120896A600FBB059 /* SharedMemoryMac.cpp */; };
1A2BB6D014117B4D000F35D4 /* PluginProcessConnectionMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2BB6CE14117B4D000F35D4 /* PluginProcessConnectionMessageReceiver.cpp */; };
1A2BB6D114117B4D000F35D4 /* PluginProcessConnectionMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2BB6CF14117B4D000F35D4 /* PluginProcessConnectionMessages.h */; };
- 1A2C307112D555450063DAA2 /* ContextMenuState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2C306F12D555450063DAA2 /* ContextMenuState.h */; };
1A2D82A4127F4EAB001EB962 /* NPObjectMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1FA35C127A45BF0050E709 /* NPObjectMessageReceiver.cpp */; };
1A2D82A5127F4EAB001EB962 /* NPObjectMessageReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A1FA35B127A45BF0050E709 /* NPObjectMessageReceiver.h */; };
1A2D82A6127F4EAB001EB962 /* NPObjectProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1FA284127A13BC0050E709 /* NPObjectProxy.cpp */; };
@@ -1073,7 +1072,6 @@
1A2BB6CC14117A5F000F35D4 /* PluginProcessConnection.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PluginProcessConnection.messages.in; sourceTree = "<group>"; };
1A2BB6CE14117B4D000F35D4 /* PluginProcessConnectionMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginProcessConnectionMessageReceiver.cpp; sourceTree = "<group>"; };
1A2BB6CF14117B4D000F35D4 /* PluginProcessConnectionMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProcessConnectionMessages.h; sourceTree = "<group>"; };
- 1A2C306F12D555450063DAA2 /* ContextMenuState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextMenuState.h; sourceTree = "<group>"; };
1A2D8411127F64E8001EB962 /* NPObjectMessageReceiver.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NPObjectMessageReceiver.messages.in; sourceTree = "<group>"; };
1A2D8437127F65D5001EB962 /* NPObjectMessageReceiverMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPObjectMessageReceiverMessageReceiver.cpp; sourceTree = "<group>"; };
1A2D8438127F65D5001EB962 /* NPObjectMessageReceiverMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NPObjectMessageReceiverMessages.h; sourceTree = "<group>"; };
@@ -2320,7 +2318,6 @@
1A2D956E12848564001EB962 /* ChildProcess.cpp */,
1A2D956D12848564001EB962 /* ChildProcess.h */,
1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */,
- 1A2C306F12D555450063DAA2 /* ContextMenuState.h */,
BCE81D96131AE02000241910 /* DictionaryPopupInfo.cpp */,
BCE81D97131AE02100241910 /* DictionaryPopupInfo.h */,
C517388012DF8F4F00EE3F47 /* DragControllerAction.h */,
@@ -3740,7 +3737,6 @@
1A6F9F9011E13EFC00DB1371 /* CommandLine.h in Headers */,
37C4E9F6131C6E7E0029BD5A /* config.h in Headers */,
BC032DAB10F437D10058C15A /* Connection.h in Headers */,
- 1A2C307112D555450063DAA2 /* ContextMenuState.h in Headers */,
BC131BC911726C2800B69727 /* CoreIPCMessageKinds.h in Headers */,
B878B615133428DC006888E9 /* CorrectionPanel.h in Headers */,
1A8EFDFA1253CAA200F7067F /* DataReference.h in Headers */,
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (109749 => 109750)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2012-03-05 16:34:29 UTC (rev 109750)
@@ -491,15 +491,8 @@
// 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.absolutePDFURL = hitTestResult.absolutePDFURL().string();
- webHitTestResultData.absoluteLinkURL = hitTestResult.absoluteLinkURL().string();
- webHitTestResultData.absoluteMediaURL = hitTestResult.absoluteMediaURL().string();
- webHitTestResultData.linkLabel = hitTestResult.textContent();
- webHitTestResultData.linkTitle = hitTestResult.titleDisplayString();
-
// Notify the UIProcess.
+ WebHitTestResult::Data webHitTestResultData(hitTestResult);
m_page->send(Messages::WebPageProxy::MouseDidMoveOverElement(webHitTestResultData, modifierFlags, InjectedBundleUserMessageEncoder(userData.get())));
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.cpp (109749 => 109750)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.cpp 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.cpp 2012-03-05 16:34:29 UTC (rev 109750)
@@ -22,10 +22,10 @@
#include "config.h"
#include "WebContextMenu.h"
-#include "ContextMenuState.h"
#include "InjectedBundleHitTestResult.h"
#include "InjectedBundleUserMessageCoders.h"
#include "WebCoreArgumentCoders.h"
+#include "WebHitTestResult.h"
#include "WebPage.h"
#include "WebPageProxyMessages.h"
#include "WebProcess.h"
@@ -79,13 +79,11 @@
if (m_page->injectedBundleContextMenuClient().getCustomMenuFromDefaultItems(m_page, hitTestResult.get(), proposedMenu, newMenu, userData))
proposedMenu = newMenu;
- ContextMenuState contextMenuState;
- contextMenuState.absoluteImageURLString = controller->hitTestResult().absoluteImageURL().string();
- contextMenuState.absoluteLinkURLString = controller->hitTestResult().absoluteLinkURL().string();
+ WebHitTestResult::Data webHitTestResultData(controller->hitTestResult());
// Mark the WebPage has having a shown context menu then notify the UIProcess.
m_page->contextMenuShowing();
- m_page->send(Messages::WebPageProxy::ShowContextMenu(view->contentsToWindow(controller->hitTestResult().point()), contextMenuState, proposedMenu, InjectedBundleUserMessageEncoder(userData.get())));
+ m_page->send(Messages::WebPageProxy::ShowContextMenu(view->contentsToWindow(controller->hitTestResult().point()), webHitTestResultData, proposedMenu, InjectedBundleUserMessageEncoder(userData.get())));
}
void WebContextMenu::itemSelected(const WebContextMenuItemData& item)
Modified: trunk/Source/WebKit2/win/WebKit2.vcproj (109749 => 109750)
--- trunk/Source/WebKit2/win/WebKit2.vcproj 2012-03-05 16:26:55 UTC (rev 109749)
+++ trunk/Source/WebKit2/win/WebKit2.vcproj 2012-03-05 16:34:29 UTC (rev 109750)
@@ -427,10 +427,6 @@
>
</File>
<File
- RelativePath="..\Shared\ContextMenuState.h"
- >
- </File>
- <File
RelativePath="..\Shared\DictionaryPopupInfo.cpp"
>
</File>