Implement action menus for tel: URLs
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Dec 2014 00:33:07 +0000 (00:33 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Dec 2014 00:33:07 +0000 (00:33 +0000)
commit8048ee4cb54403233c6b6bf89c658b938a6cfa8d
treea791e669f080c7aee74446db0d5a8bc6defffaa6
parent4b9e2b2a6b7742a63aabf91bcfb4df1a3eca59c5
Implement action menus for tel: URLs
https://bugs.webkit.org/show_bug.cgi?id=139240
<rdar://problem/19115662>

Reviewed by Anders Carlsson.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItemsForDataDetectableLink]):
Rename this function as it will work for both mailto and tel URLs.
Adjust it to use contextForView:.

(-[WebActionMenuController webView:willHandleMouseDown:]):
(-[WebActionMenuController prepareForMenu:withEvent:]):
(-[WebActionMenuController didCloseMenu:withEvent:]):
(-[WebActionMenuController _defaultMenuItems]):
Don't check the menu type when going to interact with _currentActionContext.
We'll only have a _currentActionContext if we have a data detected item,
and there are multiple menu types that end up using DDActionContext.

* WebView/WebUIDelegatePrivate.h:
Add a new type.

* Shared/API/c/WKActionMenuTypes.h:
Add a new type.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
Rename this function as it will work for both mailto and tel URLs.
Adjust it to use contextForView:.

(-[WKActionMenuController _clearActionMenuState]):
(-[WKActionMenuController menuNeedsUpdate:]):
(-[WKActionMenuController _defaultMenuItems]):
Don't check the menu type when going to interact with _currentActionContext.
We'll only have a _currentActionContext if we have a data detected item,
and there are multiple menu types that end up using DDActionContext.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebActionMenuController.mm
Source/WebKit/mac/WebView/WebUIDelegatePrivate.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKActionMenuTypes.h
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm