| 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 7d27e7cfbf7d07d2b40b7db27dfc3c9d00c72e44..b6bdb70a88eb4f25aeeab2739390953fb3e34bc4 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
|
| @@ -44,6 +44,7 @@
|
| #include "core/frame/SubresourceIntegrity.h"
|
| #include "core/frame/UseCounter.h"
|
| #include "core/frame/csp/ContentSecurityPolicy.h"
|
| +#include "core/html/CrossOriginAttribute.h"
|
| #include "core/html/LinkManifest.h"
|
| #include "core/html/imports/LinkImport.h"
|
| #include "core/inspector/ConsoleMessage.h"
|
| @@ -202,7 +203,7 @@ bool HTMLLinkElement::shouldLoadLink()
|
|
|
| bool HTMLLinkElement::loadLink(const String& type, const String& as, const KURL& url)
|
| {
|
| - return m_linkLoader.loadLink(m_relAttribute, fastGetAttribute(HTMLNames::crossoriginAttr), type, as, url, document(), NetworkHintsInterfaceImpl());
|
| + return m_linkLoader.loadLink(m_relAttribute, crossOriginAttributeValue(fastGetAttribute(HTMLNames::crossoriginAttr)), type, as, url, document(), NetworkHintsInterfaceImpl());
|
| }
|
|
|
| LinkResource* HTMLLinkElement::linkResourceToProcess()
|
| @@ -724,9 +725,9 @@ void LinkStyle::process()
|
|
|
| // Load stylesheets that are not needed for the layout immediately with low priority.
|
| FetchRequest request = builder.build(blocking);
|
| - AtomicString crossOriginMode = m_owner->fastGetAttribute(HTMLNames::crossoriginAttr);
|
| - if (!crossOriginMode.isNull()) {
|
| - request.setCrossOriginAccessControl(document().securityOrigin(), crossOriginMode);
|
| + CrossOriginAttributeValue crossOrigin = crossOriginAttributeValue(m_owner->fastGetAttribute(HTMLNames::crossoriginAttr));
|
| + if (crossOrigin != CrossOriginAttributeNotSet) {
|
| + request.setCrossOriginAccessControl(document().securityOrigin(), crossOrigin);
|
| setFetchFollowingCORS();
|
| }
|
| setResource(CSSStyleSheetResource::fetch(request, document().fetcher()));
|
|
|