Rename WebPageProxy::activeActionMenuHitTestResult to lastMouseMoveHitTestResult
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Oct 2014 19:08:14 +0000 (19:08 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Oct 2014 19:08:14 +0000 (19:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138137
<rdar://problem/18798257>

Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::mouseDidMoveOverElement):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::lastMouseMoveHitTestResult):
(WebKit::WebPageProxy::activeActionMenuHitTestResult): Deleted.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForLink]):
(-[WKActionMenuController _openURLFromActionMenu:]):
(-[WKActionMenuController _addToReadingListFromActionMenu:]):
(-[WKActionMenuController _quickLookURLFromActionMenu:]):
(-[WKActionMenuController _saveImageToDownloads:]):
(imageForResource:name::if):
(-[WKActionMenuController _updateActionMenuItems]):
Rename to the more accurate and general name.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm

index 1ec81c2..74c609c 100644 (file)
@@ -1,5 +1,28 @@
 2014-10-29  Tim Horton  <timothy_horton@apple.com>
 
+        Rename WebPageProxy::activeActionMenuHitTestResult to lastMouseMoveHitTestResult
+        https://bugs.webkit.org/show_bug.cgi?id=138137
+        <rdar://problem/18798257>
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::mouseDidMoveOverElement):
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::lastMouseMoveHitTestResult):
+        (WebKit::WebPageProxy::activeActionMenuHitTestResult): Deleted.
+        * UIProcess/mac/WKActionMenuController.mm:
+        (-[WKActionMenuController _defaultMenuItemsForLink]):
+        (-[WKActionMenuController _openURLFromActionMenu:]):
+        (-[WKActionMenuController _addToReadingListFromActionMenu:]):
+        (-[WKActionMenuController _quickLookURLFromActionMenu:]):
+        (-[WKActionMenuController _saveImageToDownloads:]):
+        (imageForResource:name::if):
+        (-[WKActionMenuController _updateActionMenuItems]):
+        Rename to the more accurate and general name.
+
+2014-10-29  Tim Horton  <timothy_horton@apple.com>
+
         Implement action menus for data detected items
         https://bugs.webkit.org/show_bug.cgi?id=138178
         <rdar://problem/18709436>
index 7533fc8..299d277 100644 (file)
@@ -3111,7 +3111,7 @@ void WebPageProxy::mouseDidMoveOverElement(const WebHitTestResult::Data& hitTest
     if (!decoder.decode(messageDecoder))
         return;
 
-    m_activeActionMenuHitTestResult = WebHitTestResult::create(hitTestResultData);
+    m_lastMouseMoveHitTestResult = WebHitTestResult::create(hitTestResultData);
 
     WebEvent::Modifiers modifiers = static_cast<WebEvent::Modifiers>(opaqueModifiers);
 
index 12c356e..3960283 100644 (file)
@@ -922,7 +922,7 @@ public:
 #if PLATFORM(MAC)
     void removeNavigationGestureSnapshot();
 
-    WebHitTestResult* activeActionMenuHitTestResult() const { return m_activeActionMenuHitTestResult.get(); }
+    WebHitTestResult* lastMouseMoveHitTestResult() const { return m_lastMouseMoveHitTestResult.get(); }
     void performActionMenuHitTestAtLocation(WebCore::FloatPoint);
 #endif
 
@@ -1383,7 +1383,7 @@ private:
     RefPtr<WebContextMenuProxy> m_activeContextMenu;
     ContextMenuContextData m_activeContextMenuContextData;
 #endif
-    RefPtr<WebHitTestResult> m_activeActionMenuHitTestResult;
+    RefPtr<WebHitTestResult> m_lastMouseMoveHitTestResult;
 
     RefPtr<WebOpenPanelResultListenerProxy> m_openPanelResultListener;
     GeolocationPermissionRequestManagerProxy m_geolocationPermissionRequestManager;
index 5586a15..c5b7c03 100644 (file)
@@ -125,7 +125,7 @@ using namespace WebKit;
 
 - (NSArray *)_defaultMenuItemsForLink
 {
-    WebHitTestResult* hitTestResult = _page->activeActionMenuHitTestResult();
+    WebHitTestResult* hitTestResult = _page->lastMouseMoveHitTestResult();
     if (!WebCore::protocolIsInHTTPFamily(hitTestResult->absoluteLinkURL()))
         return @[ ];
 
@@ -138,20 +138,20 @@ using namespace WebKit;
 
 - (void)_openURLFromActionMenu:(id)sender
 {
-    WebHitTestResult* hitTestResult = _page->activeActionMenuHitTestResult();
+    WebHitTestResult* hitTestResult = _page->lastMouseMoveHitTestResult();
     [[NSWorkspace sharedWorkspace] openURL:[NSURL _web_URLWithWTFString:hitTestResult->absoluteLinkURL()]];
 }
 
 - (void)_addToReadingListFromActionMenu:(id)sender
 {
-    WebHitTestResult* hitTestResult = _page->activeActionMenuHitTestResult();
+    WebHitTestResult* hitTestResult = _page->lastMouseMoveHitTestResult();
     NSSharingService *service = [NSSharingService sharingServiceNamed:NSSharingServiceNameAddToSafariReadingList];
     [service performWithItems:@[ [NSURL _web_URLWithWTFString:hitTestResult->absoluteLinkURL()] ]];
 }
 
 - (void)_quickLookURLFromActionMenu:(id)sender
 {
-    WebHitTestResult* hitTestResult = _page->activeActionMenuHitTestResult();
+    WebHitTestResult* hitTestResult = _page->lastMouseMoveHitTestResult();
     NSRect itemFrame = [_wkView convertRect:hitTestResult->elementBoundingBox() toView:nil];
     NSSize maximumPreviewSize = NSMakeSize(_wkView.bounds.size.width * 0.75, _wkView.bounds.size.height * 0.75);
 
@@ -202,7 +202,7 @@ using namespace WebKit;
 
 - (void)_saveImageToDownloads:(id)sender
 {
-    WebHitTestResult* hitTestResult = _page->activeActionMenuHitTestResult();
+    WebHitTestResult* hitTestResult = _page->lastMouseMoveHitTestResult();
     _page->process().context().download(_page, hitTestResult->absoluteImageURL());
 }
 
@@ -384,7 +384,7 @@ static NSImage *webKitBundleImageNamed(NSString *name)
 
 - (NSArray *)_defaultMenuItems
 {
-    if (WebHitTestResult* hitTestResult = _page->activeActionMenuHitTestResult()) {
+    if (WebHitTestResult* hitTestResult = _page->lastMouseMoveHitTestResult()) {
         if (!hitTestResult->absoluteImageURL().isEmpty() && _hitTestResult.image) {
             _type = kWKActionMenuImage;
             return [self _defaultMenuItemsForImage];
@@ -418,9 +418,9 @@ static NSImage *webKitBundleImageNamed(NSString *name)
 
     NSArray *menuItems = [self _defaultMenuItems];
     if ([_wkView respondsToSelector:@selector(_actionMenuItemsForHitTestResult:defaultActionMenuItems:)])
-        menuItems = [_wkView _actionMenuItemsForHitTestResult:toAPI(_page->activeActionMenuHitTestResult()) defaultActionMenuItems:menuItems];
+        menuItems = [_wkView _actionMenuItemsForHitTestResult:toAPI(_page->lastMouseMoveHitTestResult()) defaultActionMenuItems:menuItems];
     else
-        menuItems = [_wkView _actionMenuItemsForHitTestResult:toAPI(_page->activeActionMenuHitTestResult()) withType:_type defaultActionMenuItems:menuItems];
+        menuItems = [_wkView _actionMenuItemsForHitTestResult:toAPI(_page->lastMouseMoveHitTestResult()) withType:_type defaultActionMenuItems:menuItems];
 
     for (NSMenuItem *item in menuItems)
         [_wkView.actionMenu addItem:item];