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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.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/parser/HTMLPreloadScanner.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
index b664912074081ba5a020b8c0980045d2d856b970..78f35ee47383f575a7618d292b3f4cc3cf9e65e6 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -356,6 +356,12 @@ class TokenPreloadScanner::StartTagScanner {
} else if (match(attributeName, typeAttr)) {
m_matched &= MIMETypeRegistry::isSupportedStyleSheetMIMEType(
ContentType(attributeValue).type());
+ } else if (!m_referrerPolicySet &&
+ match(attributeName, referrerpolicyAttr) &&
+ !attributeValue.isNull()) {
+ m_referrerPolicySet = true;
+ SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords(
Mike West 2016/10/23 05:25:46 Why do we accept legacy keywords on the `referrerp
Yoav Weiss 2016/10/23 13:27:09 I just used whatever HTMLImageElement is using, an
estark 2016/10/23 14:27:03 Yeah, unfortunately all the attribute parsing is d
+ attributeValue, &m_referrerPolicy);
}
}

Powered by Google App Engine
This is Rietveld 408576698