Need to show the text indicator when Data Detectors shows a popover
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Nov 2014 21:50:16 +0000 (21:50 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Nov 2014 21:50:16 +0000 (21:50 +0000)
commit8040a5e8c0ae810fda183773ade821a35d20cfdd
treeb4a61de27de118a7efd9e8d670224c20bbb63e50
parente6a12f7d1a8879c6b825a301ed58b647688907b7
Need to show the text indicator when Data Detectors shows a popover
https://bugs.webkit.org/show_bug.cgi?id=138664
<rdar://problem/18869900>

Reviewed by Beth Dakin.

* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(hasDataDetectorsCompletionAPI):
Determine if we have the new API.

(-[WKActionMenuController willDestroyView:]):
(-[WKActionMenuController willOpenMenu:withEvent:]):
Make use of the new API.
If we wanted to show a Data Detectors menu but have no items (or they're all
disabled), cancel the menu.
If we don't have it, manually manipulate the highlight.

(-[WKActionMenuController didCloseMenu:withEvent:]):
Make use of the new API.
If we don't have it, manually manipulate the highlight.

(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
Set up completion handlers if we have the new API; when DataDetectors
presents UI, show the text indicator, when it dismisses, hide it.
If we don't have the API, manually manipulate the highlight.

* platform/spi/mac/DataDetectorsSPI.h:
Add new DataDetectors SPI.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/spi/mac/DataDetectorsSPI.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/WKActionMenuController.h
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm