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

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

Issue 2424943002: Add ReferrerPolicy support to preload (Closed)
Patch Set: Fix test. Again Created 4 years, 2 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: third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
index 9b402d3c27a141347a0b993a6164e753549fbd3b..b6591af0e56f8fc7a2b4791f069b18bfad06c251 100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -79,6 +79,8 @@ void HTMLLinkElement::parseAttribute(const QualifiedName& name,
} else if (name == asAttr) {
m_as = value;
process();
+ } else if (name == referrerpolicyAttr) {
+ m_referrerPolicy = value;
Mike West 2016/10/23 05:25:46 Where do you take the page's referrer policy into
Yoav Weiss 2016/10/23 13:27:09 It's done at the consumers of HTMLLinkElement::ref
} else if (name == sizesAttr) {
m_sizes->setValue(value);
} else if (name == mediaAttr) {
@@ -108,11 +110,13 @@ bool HTMLLinkElement::shouldLoadLink() {
bool HTMLLinkElement::loadLink(const String& type,
const String& as,
const String& media,
+ const String& referrerPolicy,
const KURL& url) {
return m_linkLoader->loadLink(
m_relAttribute,
crossOriginAttributeValue(fastGetAttribute(HTMLNames::crossoriginAttr)),
- type, as, media, url, document(), NetworkHintsInterfaceImpl());
+ type, as, media, referrerPolicy, url, document(),
+ NetworkHintsInterfaceImpl());
}
LinkResource* HTMLLinkElement::linkResourceToProcess() {

Powered by Google App Engine
This is Rietveld 408576698