[webkit-reviews] review granted: [Bug 195222] Deprecate userAgentForURL injected bundle SPI : [Attachment 363361] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 1 22:25:52 PST 2019
Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 195222: Deprecate userAgentForURL injected bundle SPI
https://bugs.webkit.org/show_bug.cgi?id=195222
Attachment 363361: Patch
https://bugs.webkit.org/attachment.cgi?id=363361&action=review
--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 363361
--> https://bugs.webkit.org/attachment.cgi?id=363361
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/WKWebProcessPlugInLoadDelegat
e.h:67
> +- (NSString
*)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextCon
troller *)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?
More information about the webkit-reviews
mailing list