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

Unified Diff: Source/core/css/CSSParserMode.cpp

Issue 314893003: Set referrer for CSS resources (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/core/css/CSSParserMode.h ('k') | Source/core/css/StyleRuleImport.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSParserMode.cpp
diff --git a/Source/core/css/CSSParserMode.cpp b/Source/core/css/CSSParserMode.cpp
index e8951b876b2afba8227deb6fc3c84bbc979aa16b..d403eb81fee460f15d92f8fe39c04e79196f0d57 100644
--- a/Source/core/css/CSSParserMode.cpp
+++ b/Source/core/css/CSSParserMode.cpp
@@ -44,6 +44,7 @@ CSSParserContext::CSSParserContext(const Document& document, UseCounter* useCoun
: m_baseURL(baseURL.isNull() ? document.baseURL() : baseURL)
, m_charset(charset)
, m_mode(document.inQuirksMode() ? HTMLQuirksMode : HTMLStandardMode)
+ , m_referrer(m_baseURL.strippedForUseAsReferrer(), document.referrerPolicy())
, m_isHTMLDocument(document.isHTMLDocument())
, m_useLegacyBackgroundSizeShorthandBehavior(document.settings() ? document.settings()->useLegacyBackgroundSizeShorthandBehavior() : false)
, m_useCounter(useCounter)
@@ -54,6 +55,7 @@ CSSParserContext::CSSParserContext(const CSSParserContext& other, UseCounter* us
: m_baseURL(other.m_baseURL)
, m_charset(other.m_charset)
, m_mode(other.m_mode)
+ , m_referrer(other.m_referrer)
, m_isHTMLDocument(other.m_isHTMLDocument)
, m_useLegacyBackgroundSizeShorthandBehavior(other.m_useLegacyBackgroundSizeShorthandBehavior)
, m_useCounter(useCounter)
« no previous file with comments | « Source/core/css/CSSParserMode.h ('k') | Source/core/css/StyleRuleImport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698