Implement Data Detectors immediate actions for WebKit2
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Dec 2014 19:45:23 +0000 (19:45 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Dec 2014 19:45:23 +0000 (19:45 +0000)
commit81b4ce886ea915186e9950af31560962619ad65f
treec8c6d61997c79684da4248ea0481065fe733e9fa
parent283833d5959bb5310284919331ccaf085501c8ea
Implement Data Detectors immediate actions for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139617
<rdar://problem/19198539>

Reviewed by Beth Dakin.

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

* UIProcess/API/mac/WKView.mm:
(-[WKView mouseDown:]):
Send mouseDown along to the WKImmediateActionController too.

(-[WKView initWithFrame:context:configuration:webView:]):
Temporarily disable action menus.

(-[WKView _dismissContentRelativeChildWindows]):
Hide the immediate action preview when detaching child windows.

* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController willDestroyView:]):
Clear the DDActionContext when tearing down the view.

(-[WKImmediateActionController wkView:willHandleMouseDown:]):
(-[WKImmediateActionController _cancelImmediateAction]):
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController _updateImmediateActionItem]):
(-[WKImmediateActionController hidePreview]):
(-[WKImmediateActionController popoverWillClose:]):
(-[WKImmediateActionController _menuItemForDataDetectedText]):
Copy most of the DataDetectors implementation into WKImmediateActionController.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKImmediateActionTypes.h
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm
Source/WebKit2/UIProcess/mac/WKImmediateActionController.h
Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm