Add more _WKElementActionTypes and provide API to create with custom types
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2019 22:24:53 +0000 (22:24 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2019 22:24:53 +0000 (22:24 +0000)
commit16efad73a5c613a1a910c5497026c1ad2ec21ef1
tree8f77cd71e5da616965a83257b65b72cb9fc21003
parente2df2b0125b2f3a98a7c30a95d07e14d25d7a221
Add more _WKElementActionTypes and provide API to create with custom types
https://bugs.webkit.org/show_bug.cgi?id=197117
<rdar://problem/50059548>

Reviewed by Tim Horton.

We were missing a few obvious types that are well-known
browser actions, and/or should be visible in share sheets.
Also, clean up the API for constructing new types.

* UIProcess/API/Cocoa/_WKElementAction.h: Add new types for opening
in new tabs, windows and downloading.
* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction elementActionWithType:title:actionHandler:]): New constructor
with type, title and action.
(+[_WKElementAction elementActionWithType:]): Call new method.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/_WKElementAction.h
Source/WebKit/UIProcess/API/Cocoa/_WKElementAction.mm