Add WebKit2 API relevant to customization of context menus
Created attachment 74428 [details] Patch v1
Comment on attachment 74428 [details] Patch v1 Left something out accidentally, stay tuned
Comment on attachment 74428 [details] Patch v1 Whoops, nope, this is the one I meant to post
Comment on attachment 74428 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=74428&action=review review- because of the leak > WebKit2/Shared/WebURLRequest.h:47 > + static PassRefPtr<WebURLRequest> create(const WebCore::KURL& url); Should leave argument name out here. > WebKit2/Shared/API/c/WKURLRequest.cpp:40 > + return toAPI(WebURLRequest::create(toImpl(url)->string()).leakRef()); Can you use toCopiedURLAPI here? > WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:199 > + if (equalIgnoringCase(url.protocol(), "file")) > + return true; You should use the isLocalFile member function. > WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:206 > + NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:url]; You need to release this request, otherwise it will leak. > WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:207 > + [request setValue:(NSString*)(userAgent()) forHTTPHeaderField:@"User-Agent"]; Extra parentheses here around userAgent(). > WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:219 > + String scheme = request.url().protocol(); > + // FIXME: Return true if this scheme is any one WebKit2 knows how to handle. > + return equalIgnoringCase(scheme, "applewebdata"); This should use the protocolIs.
Darin reviewed my fixing his comments over my shoulder. Landed in r72446
Yup, I meant to include one other set of changes. Another patch coming.
Created attachment 74438 [details] Second patch v1
r72451