WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
32359
[GTK] Don't assume downloads are always synchronous
https://bugs.webkit.org/show_bug.cgi?id=32359
Summary
[GTK] Don't assume downloads are always synchronous
Christian Dywan
Reported
2009-12-09 20:32:39 PST
The download-requested signal assumes if the download was handled, it can start it right away. This is wrong if the application needs to handle the download asynchronously. In that case, WebKit should leave it up to the API user to start or cancel the download as appropriate.
Attachments
Check if the destination URI is set and clarify the documentation
(2.19 KB, patch)
2009-12-09 20:37 PST
,
Christian Dywan
no flags
Details
Formatted Diff
Diff
Check destination URI, clarify docs and test downloads both ways
(5.36 KB, patch)
2009-12-17 02:23 PST
,
Christian Dywan
no flags
Details
Formatted Diff
Diff
Check destination URI, clarify docs and test downloads both ways #2
(5.36 KB, patch)
2009-12-17 02:38 PST
,
Christian Dywan
gustavo
: review+
gustavo
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Christian Dywan
Comment 1
2009-12-09 20:37:42 PST
Created
attachment 44590
[details]
Check if the destination URI is set and clarify the documentation
WebKit Review Bot
Comment 2
2009-12-09 20:42:00 PST
style-queue ran check-webkit-style on
attachment 44590
[details]
without any errors.
Gustavo Noronha (kov)
Comment 3
2009-12-16 03:06:22 PST
Comment on
attachment 44590
[details]
Check if the destination URI is set and clarify the documentation This works for me. Can you add a unittest, to make sure this works, to testdownload?
Christian Dywan
Comment 4
2009-12-17 02:23:35 PST
Created
attachment 45044
[details]
Check destination URI, clarify docs and test downloads both ways Updated the patch, to test downloads with having the destination set in the callback, and again with setting it later. The test breaks without the frame loader change.
WebKit Review Bot
Comment 5
2009-12-17 02:24:05 PST
Attachment 45044
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebKit/gtk/tests/testdownload.c:29: Declaration has space between * and variable name in WebKitDownload* theDownload [whitespace/declaration] [3] WebKit/gtk/tests/testdownload.c:137: Declaration has space between * and variable name in gchar* filename [whitespace/declaration] [3] WebKit/gtk/tests/testdownload.c:138: Extra space before ( in function call [whitespace/parens] [4] WebKit/gtk/tests/testdownload.c:148: Extra space before ( in function call [whitespace/parens] [4] WebKit/gtk/tests/testdownload.c:171: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 5
Christian Dywan
Comment 6
2009-12-17 02:38:21 PST
Created
attachment 45046
[details]
Check destination URI, clarify docs and test downloads both ways #2 Bracket and indentation fixed. The globals the bot complains about are correct as far as I can see.
WebKit Review Bot
Comment 7
2009-12-17 02:39:54 PST
Attachment 45046
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebKit/gtk/tests/testdownload.c:29: Declaration has space between * and variable name in WebKitDownload* theDownload [whitespace/declaration] [3] WebKit/gtk/tests/testdownload.c:137: Declaration has space between * and variable name in gchar* filename [whitespace/declaration] [3] Total errors found: 2
Gustavo Noronha (kov)
Comment 8
2009-12-17 07:33:51 PST
Comment on
attachment 45046
[details]
Check destination URI, clarify docs and test downloads both ways #2 Good, but please fix the issues pointed out by the style bot =).
Gustavo Noronha (kov)
Comment 9
2009-12-17 07:34:28 PST
(In reply to
comment #8
)
> (From update of
attachment 45046
[details]
) > Good, but please fix the issues pointed out by the style bot =).
In fact, don't. Please report those as bugs to the bot =P.
Christian Dywan
Comment 10
2009-12-17 11:16:31 PST
2009-12-17 Christian Dywan <
christian@twotoasts.de
> Reviewed by Gustavo Noronha Silva. [GTK] Don't assume downloads are always synchronous
http://bugs.webkit.org/show_bug.cgi?id=32359
* tests/testdownload.c: (download_requested_cb): (set_filename): (test_webkit_download_perform): (test_webkit_download_synch): (test_webkit_download_asynch): (main): Test downloads synchronously and asynchronously. * webkit/webkitwebview.cpp: (webkit_web_view_class_init): (webkit_web_view_request_download): Only try to start a requested download if the destination URI is set and clarify the documentation.
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