Tapping and holding a link should have a share option
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Oct 2015 19:38:40 +0000 (19:38 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Oct 2015 19:38:40 +0000 (19:38 +0000)
commit17dbebcdf8f84e44978a213659b2135c7ca388cc
treec3d42a24454ca2528906c39e266caf265eb43722
parentfad3415babf9d677f02fc3d8786600431e6d3b84
Tapping and holding a link should have a share option
https://bugs.webkit.org/show_bug.cgi?id=150693
-and corresponding-
rdar://problem/21319702

Reviewed by Tim Horton.

Source/WebCore:

* English.lproj/Localizable.strings:

Source/WebKit2:

New _WKElementActionType called _WKElementActionTypeShare.
* UIProcess/API/Cocoa/_WKElementAction.h:
* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):

_WKElementActionTypeShare is part of the default actions for links.
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):

Handle the sharing part!
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):

To support this in PDF, PDF need to create a _webSelectionAssistant.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:]):
(-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
(-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
(-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/Localizable.strings
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.h
Source/WebKit2/UIProcess/API/Cocoa/_WKElementAction.mm
Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h
Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit2/UIProcess/ios/WKPDFView.mm