RESOLVED FIXED212110
Add _WKDownloadDelegate callback including totalBytesWritten
https://bugs.webkit.org/show_bug.cgi?id=212110
Summary Add _WKDownloadDelegate callback including totalBytesWritten
Alex Christensen
Reported 2020-05-19 15:56:40 PDT
Add _WKDownloadDelegate callback including totalBytesWritten
Attachments
Patch (22.66 KB, patch)
2020-05-19 16:00 PDT, Alex Christensen
no flags
Patch (23.47 KB, patch)
2020-05-19 16:09 PDT, Alex Christensen
no flags
Patch (23.28 KB, patch)
2020-05-19 16:13 PDT, Alex Christensen
no flags
Patch (24.30 KB, patch)
2020-05-19 16:16 PDT, Alex Christensen
no flags
Alex Christensen
Comment 1 2020-05-19 16:00:41 PDT
Alex Christensen
Comment 2 2020-05-19 16:00:43 PDT
Alex Christensen
Comment 3 2020-05-19 16:09:45 PDT
Alex Christensen
Comment 4 2020-05-19 16:13:52 PDT
Alex Christensen
Comment 5 2020-05-19 16:16:44 PDT
EWS Watchlist
Comment 6 2020-05-19 16:17:35 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Geoffrey Garen
Comment 7 2020-05-19 17:15:07 PDT
Comment on attachment 399781 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399781&action=review r=me > Tools/TestWebKitAPI/cocoa/TestDownloadDelegate.mm:49 > +- (void)_download:(_WKDownload *)download didWriteData:(uint64_t)bytesWritten totalBytesWritten:(uint64_t)totalBytesWritten totalBytesExpectedToWrite:(uint64_t)totalBytesExpectedToWrite I wonder if we can keep the didReceive naming pattern, to match the rest of the API and other networking APIs. didReceiveBytes:(uint64_t)bytes totalBytes:(uint64_t)totalBytes totalBytesExpected:(uint64_t)totalBytesExpected
Alex Christensen
Comment 8 2020-05-19 17:18:01 PDT
Comment on attachment 399781 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399781&action=review >> Tools/TestWebKitAPI/cocoa/TestDownloadDelegate.mm:49 >> +- (void)_download:(_WKDownload *)download didWriteData:(uint64_t)bytesWritten totalBytesWritten:(uint64_t)totalBytesWritten totalBytesExpectedToWrite:(uint64_t)totalBytesExpectedToWrite > > I wonder if we can keep the didReceive naming pattern, to match the rest of the API and other networking APIs. > > didReceiveBytes:(uint64_t)bytes totalBytes:(uint64_t)totalBytes totalBytesExpected:(uint64_t)totalBytesExpected Downloads are not like other networking APIs. This callback is not called until the data is written to disk, just like the CFNetwork callback. There is a time between when the bytes are received and when they are written, and this should not be called during that time.
Alex Christensen
Comment 9 2020-05-19 17:18:37 PDT
It was a mistake to use the name didWriteData before and this fixes that mistake.
EWS
Comment 10 2020-05-19 17:27:24 PDT
Committed r261898: <https://trac.webkit.org/changeset/261898> All reviewed patches have been landed. Closing bug and clearing flags on attachment 399781 [details].
Note You need to log in before you can comment on or make changes to this bug.