Deprecate userAgentForURL injected bundle SPI. There are no longer any clients, using WebsitePolicies.customUserAgent is the way to go nowadays.
<rdar://problem/46734147>
Created attachment 363361 [details] Patch
Comment on attachment 363361 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363361&action=review > Source/WebKit/ChangeLog:3 > + Deprecate userAgentForURL injected bundle SPI This does more than just deprecate it. It also removes support for it, in other words makes it not be called any more. That’s not what "deprecate" means. So this is more like "remove support for" rather than "deprecate". > Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:67 > +- (NSString *)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller frame:(WKWebProcessPlugInFrame *)frame userAgentForURL:(NSURL *)url WK_API_DEPRECATED("Use _WKWebsitePolicies.customUserAgent instead", macosx(WK_MAC_TBA, WK_MAC_TBA), ios(WK_IOS_TBA, WK_IOS_TBA)); Why are we leaving this in the header at all? This is not API, so what benefit is there for this being here and marked deprecated rather than removed? These deprecation macros have helpful behavior for methods that might be called. I’m not sure they do any good for optional methods in a protocol that are are meant to be implemented. I suggest just deleting this line unless I am missing something. > Source/WebKit/WebProcess/WebPage/WebPage.cpp:3169 > +String WebPage::userAgent(WebFrame*, const URL& webcoreURL) const Should we change this to not even take a WebFrame pointer and update callers to no longer pass it?
Created attachment 363533 [details] Patch
Created attachment 363536 [details] Patch
Comment on attachment 363536 [details] Patch Clearing flags on attachment: 363536 Committed r242375: <https://trac.webkit.org/changeset/242375>
All reviewed patches have been landed. Closing bug.