Change method of signaling "should open external urls" to WebKit
Created attachment 253893 [details] Patch v1
Comment on attachment 253893 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=253893&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:1777 > + bool shouldOpenExternalURLs = [[loadOptions valueForKey:_WKShouldOpenExternalURLsKey] boolValue]; -valueForKey is a KVC method. For a dictionary, you should use -objectForKey:, but better yet, we can use dictionary subscripting: loadOptions[_WKShouldOpenExternalURLsKey] > Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:30 > +#import <WebKit/WKDeclarationSpecifiers.h> No need for this… > Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:43 > +WK_EXPORT extern NSString * const _WKShouldOpenExternalURLsKey; …we use WK_EXTERN in the modern API (and it’s coming from WKFoundation which is already imported above). Even though this is SPI, you should add an availability annotation, WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA). > Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:206 > +- (WKNavigation *)loadRequest:(NSURLRequest *)request withOptions:(NSDictionary *)loadOptions; Like all SPI methods, this one needs to be prefixed with an underscore. Even though this is SPI, you should add an availability annotation.
Created attachment 253894 [details] Patch for landing
Comment on attachment 253894 [details] Patch for landing Clearing flags on attachment: 253894 Committed r184982: <http://trac.webkit.org/changeset/184982>
Marking resolved.