Bug 140207

Summary: WKWebView should provide an API for customizing context menu
Product: WebKit Reporter: Eugene But <eugenebut>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: dieter, fpatel, quadrupleslap, stefan, stuartmorgan, tassilo.karge
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: All   
Attachments:
Description Flags
Screenshot
none
Test App none

Description Eugene But 2015-01-07 14:12:51 PST
Created attachment 244200 [details]
Screenshot

Summary:
WKWebView should delegate the action of showing a context menu on long press and let an embedder add/customize values to the context menu (e.g. via WKUIDelegate). The embedder should also be provided information about the context in which the long press triggered the action sheet (e.g. whether it was under a hyperlink/image).

e.g. we want to handle images differently by sending them to Google Image Search

Steps to Reproduce:
1) Run the attached code
2) Long press on link


Expected Results:
An action sheet that can't be customized in native code.

Actual Results:
A delegate callback providing more information about the long press (e.g. if it was an image/text hyperlink) allowing control for showing/customizing the context menu shown
Comment 1 Eugene But 2015-01-07 14:13:32 PST
Created attachment 244202 [details]
Test App
Comment 2 Eugene But 2015-01-07 16:07:07 PST
Radar ID: 17794878