Deprecate userAgentForURL injected bundle SPI. There are no longer any clients, using WebsitePolicies.customUserAgent is the way to go nowadays.
Created attachment 363361 [details]
Comment on attachment 363361 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=363361&action=review
> + 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".
> +- (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.
> +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]
Created attachment 363536 [details]
Comment on attachment 363536 [details]
Clearing flags on attachment: 363536
Committed r242375: <https://trac.webkit.org/changeset/242375>
All reviewed patches have been landed. Closing bug.