_actionMenuItemsForHitTestResult should also take a type indicating what the menu
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Oct 2014 23:51:47 +0000 (23:51 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Oct 2014 23:51:47 +0000 (23:51 +0000)
commit663df5907485d3a3a0c1cee47fb2aba7b43e2911
tree01016461369490b8af8c591034bb3be64e763026
parentd2cd7c83de314e73aa9473c3b7e488a1aba3663d
_actionMenuItemsForHitTestResult should also take a type indicating what the menu
was built for
https://bugs.webkit.org/show_bug.cgi?id=138063

Reviewed by Dan Bernstein.

New type enum that can be used by clients.
* Shared/API/c/WKActionMenuTypes.h: Added.

Remove the old SPI and add the new.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]):
(-[WKView _actionMenuItemsForHitTestResult:defaultActionMenuItems:]): Deleted.

Now keep an ivar for the type.
* UIProcess/mac/WKActionMenuController.h:

Create a category for the old SPI so that we can still call it if clients have
implemented it.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController initWithPage:view:]):
(-[WKActionMenuController didCloseMenu:withEvent:]):
(imageForResource:name::if):
(-[WKActionMenuController _updateActionMenuItems]):
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKActionMenuTypes.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/mac/WKActionMenuController.h
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj