Expose the "Share" menu for links, images, and media.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Apr 2015 23:11:38 +0000 (23:11 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Apr 2015 23:11:38 +0000 (23:11 +0000)
commitb3f83c9daa154c62829d107f307604029e329c2b
tree5b00444a77fa90748b54c94a048ca0fdad2c7715
parent3838dbf64bdb5878e71913004ccdd38f50cd6ae0
Expose the "Share" menu for links, images, and media.
<rdar://problem/20435340> and https://bugs.webkit.org/show_bug.cgi?id=143502

Reviewed by Tim Horton.

Source/WebCore:

* loader/EmptyClients.h:
* page/ContextMenuClient.h:
(WebCore::ContextMenuClient::shareSelectedTextMenuItem): Deleted.

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
(WebCore::selectionContainsPossibleWord): Deleted.
* page/ContextMenuController.h:
(WebCore::ContextMenuController::page):

* platform/ContextMenuItem.cpp:
(WebCore::ContextMenuItem::ContextMenuItem):
(WebCore::ContextMenuItem::isNull):
(WebCore::ContextMenuItem::shareMenuItem):
(WebCore::ContextMenuItem::supportsShareMenu): Deleted.
(WebCore::ContextMenuItem::shareSelectedTextMenuItem): Deleted.
* platform/ContextMenuItem.h:

* platform/gtk/ContextMenuItemGtk.cpp:
(WebCore::ContextMenuItem::shareMenuItem): Return a null item.
(WebCore::ContextMenuItem::supportsShareMenu): Deleted.
(WebCore::ContextMenuItem::shareSelectedTextMenuItem): Deleted.

* platform/mac/ContextMenuItemMac.mm:
(WebCore::ContextMenuItem::shareMenuItem): Create a full-featured Share menu item instead of just for selected text.
(WebCore::ContextMenuItem::supportsShareMenu): Deleted.
(WebCore::ContextMenuItem::shareSelectedTextMenuItem): Deleted.

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::selectedText): Instead of calculating selected text outside the HitTestResult, let the
  HitTestResult do what it does best: Calculate things!
* rendering/HitTestResult.h:

Source/WebKit/mac:

* WebCoreSupport/WebContextMenuClient.h:
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::shareMenuItem):

Source/WebKit/win:

* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::shareMenuItem):
* WebCoreSupport/WebContextMenuClient.h:

Source/WebKit2:

* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):

* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data):
* Shared/WebHitTestResult.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):

* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::shareMenuItem):
* WebProcess/WebCoreSupport/WebContextMenuClient.h:

* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::shareSelectedTextMenuItem): Deleted.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
26 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/ContextMenuClient.h
Source/WebCore/page/ContextMenuController.cpp
Source/WebCore/page/ContextMenuController.h
Source/WebCore/platform/ContextMenuItem.cpp
Source/WebCore/platform/ContextMenuItem.h
Source/WebCore/platform/gtk/ContextMenuItemGtk.cpp
Source/WebCore/platform/mac/ContextMenuItemMac.mm
Source/WebCore/rendering/HitTestResult.cpp
Source/WebCore/rendering/HitTestResult.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.h
Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
Source/WebKit/win/WebCoreSupport/WebContextMenuClient.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/ContextMenuContextData.cpp
Source/WebKit2/Shared/WebHitTestResult.cpp
Source/WebKit2/Shared/WebHitTestResult.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.h
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm