[Webkit-unassigned] [Bug 129322] [iOS] Download support by CFURLDownloadRef under USE(CFNETWORK).

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 18 16:15:23 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=129322


Anders Carlsson <andersca at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #225499|review?                     |review-
               Flag|                            |




--- Comment #8 from Anders Carlsson <andersca at apple.com>  2014-03-18 16:15:44 PST ---
(From update of attachment 225499)
View in context: https://bugs.webkit.org/attachment.cgi?id=225499&action=review

> Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.h:45
> + at protocol WKDownloadDelegate <NSObject>
> + at optional
> +
> +- (void)downloadDidStart:(WKWebDownload *)download;
> +- (NSString *)download:(WKWebDownload *)download decideDestinationWithSuggestedFilename:(NSString *)filename allowOverwrite:(BOOL *)allowOverwrite;
> +- (void)downloadDidFinish:(WKWebDownload *)download;
> +- (void)download:(WKWebDownload *)download didReceiveResponse:(NSURLResponse *)response;
> +- (void)download:(WKWebDownload *)download didReceiveData:(uint64_t)length;
> +
> + at end

This should not be here. It should probably be in WKProcessPoolPrivate, and named accordingly.

> Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.h:67
> + at property (assign) id <WKDownloadDelegate> downloadDelegate;

This should be on WKProcessPoolPrivate (and named accordingly). It should also be weak.

> Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm:244
> +static void setUpDownloadClient(WKProcessGroup *processGroup, WKContextRef contextRef)
> +{
> +    WKContextDownloadClientV0 downloadClient;
> +    memset(&downloadClient, 0, sizeof(downloadClient));
> +
> +    downloadClient.base.version = 0;
> +    downloadClient.base.clientInfo = processGroup;
> +    downloadClient.didStart = didStart;
> +    downloadClient.decideDestinationWithSuggestedFilename = decideDestinationWithSuggestedFilename;
> +    downloadClient.didFinish = didFinish;
> +    downloadClient.didReceiveResponse = didReceiveResponse;
> +    downloadClient.didReceiveData = didReceiveData;
> +
> +    WKContextSetDownloadClient(contextRef, &downloadClient.base);
> +}

This is also wrong. You should create an APIDownloadClient subclass, see what we've done for APILoaderClient and APIPolicyClient for example.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebDownload.h:33
> + at interface WKWebDownload : NSObject

Should be SPI and marked accordingly.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list