Bug 85044 - [BlackBerry] Support html5 download attribute
: [BlackBerry] Support html5 download attribute
Status: RESOLVED FIXED
: WebKit
WebKit BlackBerry
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-04-27 02:56 PST by
Modified: 2012-05-06 21:09 PST (History)


Attachments
Patch (9.62 KB, patch)
2012-04-27 03:22 PST, Mary Wu
no flags Review Patch | Details | Formatted Diff | Diff
Patch (10.73 KB, patch)
2012-05-02 18:40 PST, Mary Wu
no flags Review Patch | Details | Formatted Diff | Diff
Patch (10.86 KB, patch)
2012-05-06 20:10 PST, Mary Wu
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2012-04-27 02:56:08 PST
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.
------- Comment #1 From 2012-04-27 03:22:06 PST -------
Created an attachment (id=139163) [details]
Patch
------- Comment #2 From 2012-04-27 20:37:41 PST -------
setSuggestSaveName should be setSuggestedSaveName. Too tired to look at the rest right now.
------- Comment #3 From 2012-04-30 07:10:26 PST -------
(In reply to comment #1)
> Created an attachment (id=139163) [details] [details]
> Patch

Looks good to me.
------- Comment #4 From 2012-05-01 19:07:44 PST -------
Mary, did you test CrossThreadResourceRequestData or redirect?
------- Comment #5 From 2012-05-02 07:35:03 PST -------
(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.
------- Comment #6 From 2012-05-02 18:20:40 PST -------
(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.
------- Comment #7 From 2012-05-02 18:40:46 PST -------
Created an attachment (id=139936) [details]
Patch
------- Comment #8 From 2012-05-02 19:25:52 PST -------
LGTM
------- Comment #9 From 2012-05-03 17:29:25 PST -------
(From update of attachment 139936 [details])
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.
------- Comment #10 From 2012-05-03 21:25:05 PST -------
(From update of attachment 139936 [details])
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
------- Comment #11 From 2012-05-06 20:10:27 PST -------
Created an attachment (id=140462) [details]
Patch
------- Comment #12 From 2012-05-06 21:08:56 PST -------
(From update of attachment 140462 [details])
Clearing flags on attachment: 140462

Committed r116265: <http://trac.webkit.org/changeset/116265>
------- Comment #13 From 2012-05-06 21:09:01 PST -------
All reviewed patches have been landed.  Closing bug.