Index: Source/core/loader/LinkLoader.cpp |
diff --git a/Source/core/loader/LinkLoader.cpp b/Source/core/loader/LinkLoader.cpp |
index 25c23488f04ba758900e36b47a0f75d52ef52502..8517a62cfd7317e91e39c4ab83a5f08b72ce5e10 100644 |
--- a/Source/core/loader/LinkLoader.cpp |
+++ b/Source/core/loader/LinkLoader.cpp |
@@ -98,7 +98,7 @@ void LinkLoader::didSendDOMContentLoadedForPrerender() |
m_client->didSendDOMContentLoadedForLinkPrerender(); |
} |
-bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, const String& type, const KURL& href, Document& document) |
+bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, const AtomicString& crossOriginMode, const String& type, const KURL& href, Document& document) |
{ |
if (relAttribute.isDNSPrefetch()) { |
Settings* settings = document.settings(); |
@@ -114,6 +114,8 @@ bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, const String& ty |
return false; |
Resource::Type type = relAttribute.isLinkSubresource() ? Resource::LinkSubresource : Resource::LinkPrefetch; |
FetchRequest linkRequest(ResourceRequest(document.completeURL(href)), FetchInitiatorTypeNames::link); |
+ if (!crossOriginMode.isNull()) |
+ linkRequest.setCrossOriginAccessControl(document.securityOrigin(), crossOriginMode); |
setResource(document.fetcher()->fetchLinkResource(type, linkRequest)); |
} |