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

Unified Diff: Source/core/loader/FrameLoader.cpp

Issue 1253413003: Implement referrerpolicy attribute for anchor elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 months 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: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 6bfdf9d8506f19acb3f343a2ef6baa8175439cc1..918378e380fb89acabe6bb73d2f328495387b290 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -704,9 +704,9 @@ void FrameLoader::setReferrerForFrameRequest(ResourceRequest& request, ShouldSen
{
if (!originDocument)
return;
- // FIXME: This should be an assertion, but there's some plugin code in the chromium repo
- // that both determines its own referrer and expects to be associated with an originDocument.
- if (!request.httpReferrer().isEmpty())
+ // Anchor elements with the 'referrerpolicy' attribute will have
+ // already set the referrer on the request.
+ if (request.didSetHTTPReferrer())
return;
if (shouldSendReferrer == NeverSendReferrer)
return;
« Source/core/html/HTMLAnchorElement.idl ('K') | « Source/core/html/HTMLAttributeNames.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698