RESOLVED FIXED 136325
Pass the resource identifier in willSendRequest callback; and pass pageIsProvisionallyLoading flag in didInitiateLoadForResource.
https://bugs.webkit.org/show_bug.cgi?id=136325
Summary Pass the resource identifier in willSendRequest callback; and pass pageIsProv...
Yongjun Zhang
Reported 2014-08-27 17:29:02 PDT
The delegate method webProcessPlugInBrowserContextController:frame:willSendRequest:redirectResponse: in WKWebProcessPlugInLoadDelegate doesn't pass the resource identifier, we should add it back, like we did with didInitialLoadForResource: method.
Attachments
Patch. (4.97 KB, patch)
2014-08-27 17:33 PDT, Yongjun Zhang
no flags
Fix style issue. (4.61 KB, patch)
2014-08-27 17:45 PDT, Yongjun Zhang
no flags
Revise patch; falls back to old delegate methods if the new ones are not implemented by a client. (8.23 KB, patch)
2014-08-29 16:38 PDT, Yongjun Zhang
no flags
Fi style issues. (7.26 KB, patch)
2014-09-02 14:06 PDT, Yongjun Zhang
no flags
Yongjun Zhang
Comment 1 2014-08-27 17:33:22 PDT
WebKit Commit Bot
Comment 2 2014-08-27 17:36:13 PDT
Attachment 237274 [details] did not pass style-queue: ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:234: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:236: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:237: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 3 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yongjun Zhang
Comment 3 2014-08-27 17:45:42 PDT
Created attachment 237275 [details] Fix style issue.
Darin Adler
Comment 4 2014-08-29 10:03:27 PDT
Comment on attachment 237275 [details] Fix style issue. View in context: https://bugs.webkit.org/attachment.cgi?id=237275&action=review > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:54 > +- (NSURLRequest *)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller frame:(WKWebProcessPlugInFrame *)frame willSendRequestForResource:(uint64_t)resource request:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse; How can we just change a protocol like this in public API? Don’t we need to keep existing clients compatible? I think there’s a pattern we need to follow here to deprecate an old method signature and replace it with a new one, calling the old one if the new one isn’t present. Or maybe this isn’t public API yet?
Yongjun Zhang
Comment 5 2014-08-29 10:55:48 PDT
(In reply to comment #4) > (From update of attachment 237275 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=237275&action=review > > > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:54 > > +- (NSURLRequest *)webProcessPlugInBrowserContextController:(WKWebProcessPlugInBrowserContextController *)controller frame:(WKWebProcessPlugInFrame *)frame willSendRequestForResource:(uint64_t)resource request:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse; > > How can we just change a protocol like this in public API? Don’t we need to keep existing clients compatible? I think there’s a pattern we need to follow here to deprecate an old method signature and replace it with a new one, calling the old one if the new one isn’t present. > > Or maybe this isn’t public API yet? No, this is not public API yet and it is subject to change. That said, I think it is better to follow the staging pattern that falls back to old signature if the new method isn't implemented by the delegate. And we can remove the check when all client are moving to the new method.
Yongjun Zhang
Comment 6 2014-08-29 16:38:41 PDT
Created attachment 237389 [details] Revise patch; falls back to old delegate methods if the new ones are not implemented by a client.
WebKit Commit Bot
Comment 7 2014-08-29 16:44:58 PDT
Attachment 237389 [details] did not pass style-queue: ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:234: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:236: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:237: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:244: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:245: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:246: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:263: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:265: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 8 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yongjun Zhang
Comment 8 2014-09-02 14:06:10 PDT
Created attachment 237513 [details] Fi style issues.
WebKit Commit Bot
Comment 9 2014-09-02 16:09:15 PDT
Comment on attachment 237513 [details] Fi style issues. Clearing flags on attachment: 237513 Committed r173191: <http://trac.webkit.org/changeset/173191>
WebKit Commit Bot
Comment 10 2014-09-02 16:09:18 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.