WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
176481
[WK2] Notify client when downloads are redirected
https://bugs.webkit.org/show_bug.cgi?id=176481
Summary
[WK2] Notify client when downloads are redirected
Chris Dumez
Reported
2017-09-06 16:36:08 PDT
We should notify client when downloads are redirected. The client has currently no way of knowing.
Attachments
Patch
(19.78 KB, patch)
2017-09-06 16:40 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
(1.45 MB, application/zip)
2017-09-06 17:54 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews126 for ios-simulator-wk2
(1.32 MB, application/zip)
2017-09-06 18:20 PDT
,
Build Bot
no flags
Details
Patch
(21.89 KB, patch)
2017-09-06 18:51 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(21.51 KB, patch)
2017-09-06 18:53 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(28.00 KB, patch)
2017-09-06 22:06 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(33.08 KB, patch)
2017-09-07 10:17 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(33.11 KB, patch)
2017-09-07 11:32 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(33.07 KB, patch)
2017-09-07 11:53 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(33.09 KB, patch)
2017-09-07 12:02 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(9)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2017-09-06 16:40:23 PDT
Created
attachment 320078
[details]
Patch
Build Bot
Comment 2
2017-09-06 17:54:12 PDT
Comment on
attachment 320078
[details]
Patch
Attachment 320078
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/4469115
New failing tests: http/tests/download/anchor-download-redirect.html
Build Bot
Comment 3
2017-09-06 17:54:13 PDT
Created
attachment 320084
[details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 4
2017-09-06 18:20:41 PDT
Comment on
attachment 320078
[details]
Patch
Attachment 320078
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/4469201
New failing tests: http/tests/download/anchor-download-redirect.html
Build Bot
Comment 5
2017-09-06 18:20:43 PDT
Created
attachment 320087
[details]
Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Chris Dumez
Comment 6
2017-09-06 18:51:37 PDT
Created
attachment 320089
[details]
Patch
Chris Dumez
Comment 7
2017-09-06 18:53:33 PDT
Created
attachment 320090
[details]
Patch
Chris Dumez
Comment 8
2017-09-06 22:06:39 PDT
Created
attachment 320095
[details]
Patch
Chris Dumez
Comment 9
2017-09-07 09:49:52 PDT
<
rdar://problem/34309065
>
Chris Dumez
Comment 10
2017-09-07 10:17:54 PDT
Created
attachment 320126
[details]
Patch
Geoffrey Garen
Comment 11
2017-09-07 10:35:50 PDT
Comment on
attachment 320126
[details]
Patch The API is called "...ClientRedirect...". What does the client see for server redirects?
Chris Dumez
Comment 12
2017-09-07 10:40:18 PDT
(In reply to Geoffrey Garen from
comment #11
)
> Comment on
attachment 320126
[details]
> Patch > > The API is called "...ClientRedirect...". What does the client see for > server redirects?
Hmm. I think this is badly named. We notify the client of HTTP server redirects.
Chris Dumez
Comment 13
2017-09-07 10:41:26 PDT
(In reply to Chris Dumez from
comment #12
)
> (In reply to Geoffrey Garen from
comment #11
) > > Comment on
attachment 320126
[details]
> > Patch > > > > The API is called "...ClientRedirect...". What does the client see for > > server redirects? > > Hmm. I think this is badly named. We notify the client of HTTP server > redirects.
The equivalent delegate for navigation is named: didReceiveServerRedirectForProvisionalNavigation
Chris Dumez
Comment 14
2017-09-07 10:43:47 PDT
(In reply to Chris Dumez from
comment #13
)
> (In reply to Chris Dumez from
comment #12
) > > (In reply to Geoffrey Garen from
comment #11
) > > > Comment on
attachment 320126
[details]
> > > Patch > > > > > > The API is called "...ClientRedirect...". What does the client see for > > > server redirects? > > > > Hmm. I think this is badly named. We notify the client of HTTP server > > redirects. > > The equivalent delegate for navigation is named: > didReceiveServerRedirectForProvisionalNavigation
What do you think about calling the delegate: "didReceiveServerRedirect" ?
Chris Dumez
Comment 15
2017-09-07 10:55:59 PDT
(In reply to Chris Dumez from
comment #14
)
> (In reply to Chris Dumez from
comment #13
) > > (In reply to Chris Dumez from
comment #12
) > > > (In reply to Geoffrey Garen from
comment #11
) > > > > Comment on
attachment 320126
[details]
> > > > Patch > > > > > > > > The API is called "...ClientRedirect...". What does the client see for > > > > server redirects? > > > > > > Hmm. I think this is badly named. We notify the client of HTTP server > > > redirects. > > > > The equivalent delegate for navigation is named: > > didReceiveServerRedirectForProvisionalNavigation > > What do you think about calling the delegate: "didReceiveServerRedirect" ?
Or didReceiveServerRedirectToURL
Chris Dumez
Comment 16
2017-09-07 11:32:38 PDT
Created
attachment 320145
[details]
Patch
Geoffrey Garen
Comment 17
2017-09-07 11:36:29 PDT
> What do you think about calling the delegate: "didReceiveServerRedirect" ?
I like didReceiveServerRedirect. I would leave off "ToURL" because the other names in this group leave off their direct objects as well.
Chris Dumez
Comment 18
2017-09-07 11:41:35 PDT
Comment on
attachment 320145
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=320145&action=review
> Source/WebKit/UIProcess/API/Cocoa/_WKDownloadDelegate.h:37 > +- (void)_download:(_WKDownload *)download didReceiveServerRedirectToURL:(NSURL *)url WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
How about for the ObC API. Do you also prefer to omit the "toURL" suffix? It seems other delegates do provide the name for the parameter, e.g.: - (void)_download:(_WKDownload *)download didFailWithError:(NSError *)error; - (NSString *)_download:(_WKDownload *)download decideDestinationWithSuggestedFilename:(NSString *)filename allowOverwrite:(BOOL *)allowOverwrite; - (void)_download:(_WKDownload *)download didReceiveResponse:(NSURLResponse *)response;
Chris Dumez
Comment 19
2017-09-07 11:53:17 PDT
Created
attachment 320150
[details]
Patch
Geoffrey Garen
Comment 20
2017-09-07 11:56:06 PDT
> > Source/WebKit/UIProcess/API/Cocoa/_WKDownloadDelegate.h:37 > > +- (void)_download:(_WKDownload *)download didReceiveServerRedirectToURL:(NSURL *)url WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > > How about for the ObC API. Do you also prefer to omit the "toURL" suffix?
A related API in LegacyWebKit is named "willPerformClientRedirectToURL...". I like ToURL for the ObjC API. It's a little more Cocoa-y to name your direct object (as you pointed out too).
Chris Dumez
Comment 21
2017-09-07 12:02:50 PDT
Created
attachment 320152
[details]
Patch
Geoffrey Garen
Comment 22
2017-09-07 12:08:37 PDT
Comment on
attachment 320152
[details]
Patch r=me
WebKit Commit Bot
Comment 23
2017-09-07 12:52:01 PDT
Comment on
attachment 320152
[details]
Patch Clearing flags on attachment: 320152 Committed
r221749
: <
http://trac.webkit.org/changeset/221749
>
WebKit Commit Bot
Comment 24
2017-09-07 12:52:03 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.
Top of Page
Format For Printing
XML
Clone This Bug