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

Unified Diff: Source/core/html/parser/HTMLPreloadScanner.cpp

Issue 1189403002: Fix Preloader Meta Accept-CH bug (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix broken tests Created 5 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 | « no previous file | Source/core/html/parser/HTMLPreloadScannerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLPreloadScanner.cpp
diff --git a/Source/core/html/parser/HTMLPreloadScanner.cpp b/Source/core/html/parser/HTMLPreloadScanner.cpp
index 8ac2ad63be48149957c15c07014b789da8821c5f..2865b39e6bfe55f54efeefcf7f184fe538944549 100644
--- a/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -537,10 +537,13 @@ void TokenPreloadScanner::scanCommon(const Token& token, const SegmentedString&
const typename Token::Attribute* equivAttribute = token.getAttributeItem(http_equivAttr);
if (equivAttribute) {
String equivAttributeValue(equivAttribute->value);
- if (equalIgnoringCase(equivAttributeValue, "content-security-policy"))
+ if (equalIgnoringCase(equivAttributeValue, "content-security-policy")) {
m_isCSPEnabled = true;
- else if (equalIgnoringCase(equivAttributeValue, "accept-ch"))
- handleAcceptClientHintsHeader(equivAttributeValue, m_clientHintsPreferences, nullptr);
+ } else if (equalIgnoringCase(equivAttributeValue, "accept-ch")) {
+ const typename Token::Attribute* contentAttribute = token.getAttributeItem(contentAttr);
+ if (contentAttribute)
+ handleAcceptClientHintsHeader(String(contentAttribute->value), m_clientHintsPreferences, nullptr);
Mike West 2015/06/19 12:16:07 Heh. Your reviewer should totally have caught that
+ }
return;
}
const typename Token::Attribute* nameAttribute = token.getAttributeItem(nameAttr);
« no previous file with comments | « no previous file | Source/core/html/parser/HTMLPreloadScannerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698