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

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

Issue 1801513003: Cross origin requests to same origin should match Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed failing CORS tests Created 4 years, 9 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 6bc0897a56d9bcfb50e61291919ab2641b6485f9..c04623cf768c81dc757bb9879c9a8ae460a97511 100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -749,10 +749,9 @@ void LinkStyle::process()
bool lowPriority = !mediaQueryMatches || m_owner->isAlternate();
FetchRequest request = builder.build(lowPriority);
CrossOriginAttributeValue crossOrigin = crossOriginAttributeValue(m_owner->fastGetAttribute(HTMLNames::crossoriginAttr));
- if (crossOrigin != CrossOriginAttributeNotSet) {
- request.setCrossOriginAccessControl(document().getSecurityOrigin(), crossOrigin);
+ request.setCrossOriginAccessControl(document().getSecurityOrigin(), crossOrigin);
+ if (crossOrigin != CrossOriginAttributeNotSet)
setFetchFollowingCORS();
- }
setResource(CSSStyleSheetResource::fetch(request, document().fetcher()));
if (m_loading && !resource()) {

Powered by Google App Engine
This is Rietveld 408576698