Bug 219820 - Remove WKDownloadDelegate.didWriteData
Summary: Remove WKDownloadDelegate.didWriteData
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-11 21:01 PST by Alex Christensen
Modified: 2020-12-14 11:28 PST (History)
3 users (show)

See Also:


Attachments
Patch (24.08 KB, patch)
2020-12-11 21:03 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (24.14 KB, patch)
2020-12-14 10:15 PST, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2020-12-11 21:01:11 PST
Remove WKDownloadDelegate.didWriteData
Comment 1 Alex Christensen 2020-12-11 21:03:00 PST
Created attachment 416086 [details]
Patch
Comment 2 James Savage 2020-12-12 13:36:16 PST
Comment on attachment 416086 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=416086&action=review

> Source/WebKit/UIProcess/API/Cocoa/WKDownload.mm:221
> +        downloadProgress = [NSProgress progressWithTotalUnitCount:-1];

Presumably -1 is a sentinel for undetermined/indeterminate progress? Why was this 100 originally?
Comment 3 Alex Christensen 2020-12-12 14:00:07 PST
It is, and a download that has an unknown content length uses -1.  I initially used 100 based on NSURLSession's behavior, but I decided it would be better to consistently use -1 for non-determined length.
Comment 4 EWS 2020-12-12 14:00:47 PST
james.savage@apple.com does not have reviewer permissions according to https://svn.webkit.org/repository/webkit/trunk/Tools/Scripts/webkitpy/common/config/contributors.json.

Rejecting attachment 416086 [details] from commit queue.
Comment 5 Sam Weinig 2020-12-13 08:37:39 PST
Comment on attachment 416086 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=416086&action=review

>> Source/WebKit/UIProcess/API/Cocoa/WKDownload.mm:221
>> +        downloadProgress = [NSProgress progressWithTotalUnitCount:-1];
> 
> Presumably -1 is a sentinel for undetermined/indeterminate progress? Why was this 100 originally?

Maybe throwing the -1 into a constant will help clear this up.
Comment 6 Alex Christensen 2020-12-14 10:15:50 PST
Created attachment 416169 [details]
Patch
Comment 7 EWS 2020-12-14 11:27:58 PST
Committed r270790: <https://trac.webkit.org/changeset/270790>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 416169 [details].
Comment 8 Radar WebKit Bug Importer 2020-12-14 11:28:18 PST
<rdar://problem/72306511>