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

Unified Diff: third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp

Issue 2561903002: [downloads] Set initiator when handling downloads via a[download] (Closed)
Patch Set: Fix compilation Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp b/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
index f0d8d4debbd1175128b1b2db70a352b351ec7ea2..baad42d767759a02b470b30eac1dd54579578130 100644
--- a/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
@@ -421,6 +421,7 @@ void HTMLAnchorElement::handleClick(Event* event) {
document().getSecurityOrigin()->canRequest(completedURL);
const AtomicString& suggestedName =
(isSameOrigin ? fastGetAttribute(downloadAttr) : nullAtom);
+ request.setRequestorOrigin(SecurityOrigin::create(document().url()));
frame->loader().client()->loadURLExternally(
request, NavigationPolicyDownload, suggestedName, false);

Powered by Google App Engine
This is Rietveld 408576698