RESOLVED FIXED Bug 85044
[BlackBerry] Support html5 download attribute
https://bugs.webkit.org/show_bug.cgi?id=85044
Summary [BlackBerry] Support html5 download attribute
Mary Wu
Reported 2012-04-27 02:56:08 PDT
The Spec: ====================================== 4.12.4 Downloading resources In some cases, resources are intended for later use rather than immediate viewing. To indicate that a resource is intended to be downloaded for use later, rather than immediately used, the download attribute can be specified on the a or area element that creates the hyperlink to that resource. The attribute can furthermore be given a value, to specify the filename that user agents are to use when storing the resource in a file system. This value can be overridden by the Content-Disposition HTTP header's filename parameters. [RFC6266] Steps to Reproduce: ======================================= 1. Navigate to http://updates.html5rocks.com/2011/08/Downloading-resources-in-HTML5-a-download with PlayBook browser 2. Click the "download me" hyper-link in the page. The HTML for it: <a href="http://www.google.com/.../logo2w.png" download="MyGoogleLogo">download me</a> Expected result: ======================================= The download dialogue will pop up with file name as "MyGoogleLogo.png", which is the value of the download attribute.
Attachments
Patch (9.62 KB, patch)
2012-04-27 03:22 PDT, Mary Wu
no flags
Patch (10.73 KB, patch)
2012-05-02 18:40 PDT, Mary Wu
no flags
Patch (10.86 KB, patch)
2012-05-06 20:10 PDT, Mary Wu
no flags
Mary Wu
Comment 1 2012-04-27 03:22:06 PDT
Joe Mason
Comment 2 2012-04-27 20:37:41 PDT
setSuggestSaveName should be setSuggestedSaveName. Too tired to look at the rest right now.
Lyon Chen
Comment 3 2012-04-30 07:10:26 PDT
(In reply to comment #1) > Created an attachment (id=139163) [details] > Patch Looks good to me.
Chris.Guan
Comment 4 2012-05-01 19:07:44 PDT
Mary, did you test CrossThreadResourceRequestData or redirect?
Joe Mason
Comment 5 2012-05-02 07:35:03 PDT
(In reply to comment #4) > Mary, did you test CrossThreadResourceRequestData or redirect? Good catch - the new member variable needs to be added to that too. Also I just noticed it's missing m_overrideContentType and m_targetType.
Mary Wu
Comment 6 2012-05-02 18:20:40 PDT
(In reply to comment #5) > (In reply to comment #4) > > Mary, did you test CrossThreadResourceRequestData or redirect? > > Good catch - the new member variable needs to be added to that too. Also I just noticed it's missing m_overrideContentType and m_targetType. thanks, will add in CrossThreadResourceRequestData. also for the missing members, will create separate pr to track.
Mary Wu
Comment 7 2012-05-02 18:40:46 PDT
Joe Mason
Comment 8 2012-05-02 19:25:52 PDT
LGTM
WebKit Review Bot
Comment 9 2012-05-03 17:29:25 PDT
Comment on attachment 139936 [details] Patch Rejecting attachment 139936 [details] from commit-queue. mary.wu@torchmobile.com.cn does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py. - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.
WebKit Review Bot
Comment 10 2012-05-03 21:25:05 PDT
Comment on attachment 139936 [details] Patch Rejecting attachment 139936 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: ED at 244. 2 out of 3 hunks FAILED -- saving rejects to file Source/WebCore/platform/network/blackberry/ResourceRequestBlackBerry.cpp.rej patching file Source/WebKit/blackberry/Api/WebPage.cpp patching file Source/WebKit/blackberry/Api/WebPage_p.h patching file Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Antonio Go..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue/ Full output: http://queues.webkit.org/results/12507050
Mary Wu
Comment 11 2012-05-06 20:10:27 PDT
WebKit Review Bot
Comment 12 2012-05-06 21:08:56 PDT
Comment on attachment 140462 [details] Patch Clearing flags on attachment: 140462 Committed r116265: <http://trac.webkit.org/changeset/116265>
WebKit Review Bot
Comment 13 2012-05-06 21:09:01 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.