Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Issue 7521007: Merge 91797 - Add support for download='filename' attribute in anchors. (Closed)

Created:
9 years, 5 months ago by kerz_chromium
Modified:
9 years, 5 months ago
Reviewers:
abarth
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/835/
Visibility:
Public.

Description

Merge 91797 - Add support for download='filename' attribute in anchors. https://bugs.webkit.org/show_bug.cgi?id=64580 Patch by Sadrul Habib Chowdhury <sadrul@chromium.org>; on 2011-07-26 Reviewed by Adam Barth. Source/WebCore: The download attribute allows the author of the hyperlink to cause the browser to download the linked URL. The author can also supply a suggested file name in the attribute value. This feature is a recent addition to HTML to better support offline applications that use blob URLs. Traditionally, web sites use the HTTP Content-Disposition header to trigger downloads, but that option isn't available when working offline. There is some question about whether we should initiate a download when we receive a DOM-created click event. This patch does initiate the download, but we might revise that decision in the future as part of a larger change in how WebKit treats the interaction between default event handlers and DOM-created events. Tests: fast/dom/HTMLAnchorElement/anchor-download.html fast/dom/HTMLAnchorElement/anchor-nodownload.html fast/dom/HTMLAnchorElement/anchor-download-unset.html fast/dom/HTMLAnchorElement/anchor-nodownload-set.html * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler): (WebCore::HTMLAnchorElement::handleClick): * html/HTMLAnchorElement.h: * html/HTMLAnchorElement.idl: * html/HTMLAttributeNames.in: * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::startDownload): * loader/FrameLoaderClient.h: Source/WebKit/chromium: * features.gypi: * public/WebFrameClient.h: (WebKit::WebFrameClient::loadURLExternally): * src/FrameLoaderClientImpl.cpp: (WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForNavigationAction): (WebKit::FrameLoaderClientImpl::startDownload): * src/FrameLoaderClientImpl.h: Source/WebKit/efl: * WebCoreSupport/FrameLoaderClientEfl.cpp: (WebCore::FrameLoaderClientEfl::startDownload): * WebCoreSupport/FrameLoaderClientEfl.h: Source/WebKit/gtk: * WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::FrameLoaderClient::startDownload): * WebCoreSupport/FrameLoaderClientGtk.h: Source/WebKit/haiku: * WebCoreSupport/FrameLoaderClientHaiku.cpp: (WebCore::FrameLoaderClientHaiku::startDownload): * WebCoreSupport/FrameLoaderClientHaiku.h: Source/WebKit/qt: * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::startDownload): * WebCoreSupport/FrameLoaderClientQt.h: Source/WebKit/win: * WebFrame.cpp: (WebFrame::startDownload): * WebFrame.h: Source/WebKit/wince: * WebCoreSupport/FrameLoaderClientWinCE.cpp: (WebKit::FrameLoaderClientWinCE::startDownload): * WebCoreSupport/FrameLoaderClientWinCE.h: Source/WebKit/wx: * WebKitSupport/FrameLoaderClientWx.cpp: (WebCore::FrameLoaderClientWx::startDownload): * WebKitSupport/FrameLoaderClientWx.h: Source/WebKit2: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::startDownload): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Tools: * DumpRenderTree/chromium/WebViewHost.cpp: (WebViewHost::loadURLExternally): * DumpRenderTree/chromium/WebViewHost.h: LayoutTests: * fast/dom/HTMLAnchorElement/anchor-download-expected.txt: Added. * fast/dom/HTMLAnchorElement/anchor-download.html: Added. * fast/dom/HTMLAnchorElement/anchor-nodownload-expected.txt: Added. * fast/dom/HTMLAnchorElement/anchor-nodownload.html: Added. * fast/dom/HTMLAnchorElement/anchor-download-unset-expected.txt: Added. * fast/dom/HTMLAnchorElement/anchor-download-unset.html: Added. * fast/dom/HTMLAnchorElement/anchor-nodownload-set-expected.txt: Added. * fast/dom/HTMLAnchorElement/anchor-nodownload-set.html: Added. TBR=abarth@webkit.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=91867

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -20 lines) Patch
A + LayoutTests/fast/dom/HTMLAnchorElement/anchor-download.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-unset.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/dom/HTMLAnchorElement/anchor-download-unset-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload-set.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/dom/HTMLAnchorElement/anchor-nodownload-set-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M LayoutTests/platform/gtk/Skipped View 1 chunk +6 lines, -0 lines 0 comments Download
M LayoutTests/platform/mac/Skipped View 1 chunk +6 lines, -0 lines 0 comments Download
M LayoutTests/platform/qt/Skipped View 1 chunk +6 lines, -0 lines 0 comments Download
M LayoutTests/platform/win/Skipped View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/WebCore/html/HTMLAnchorElement.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/WebCore/html/HTMLAnchorElement.cpp View 3 chunks +33 lines, -4 lines 0 comments Download
M Source/WebCore/html/HTMLAnchorElement.idl View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/html/HTMLAttributeNames.in View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/loader/EmptyClients.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/loader/FrameLoaderClient.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/chromium/features.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebKit/chromium/public/WebFrameClient.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/WebKit/chromium/src/FrameLoaderClientImpl.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/haiku/ChangeLog View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/win/WebFrame.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/win/WebFrame.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/wince/ChangeLog View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/wx/ChangeLog View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Tools/DumpRenderTree/chromium/WebViewHost.h View 1 chunk +1 line, -0 lines 0 comments Download
M Tools/DumpRenderTree/chromium/WebViewHost.cpp View 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 1 (0 generated)
kerz_chromium
9 years, 5 months ago (2011-07-27 21:17:45 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698