Index: Source/core/css/CSSImageValue.cpp |
diff --git a/Source/core/css/CSSImageValue.cpp b/Source/core/css/CSSImageValue.cpp |
index f8b863816cd8a73b937b653ca130c796bbce2b66..9fcfbeefd6a4cbb8dc81b32b8a344e83435f8d29 100644 |
--- a/Source/core/css/CSSImageValue.cpp |
+++ b/Source/core/css/CSSImageValue.cpp |
@@ -60,19 +60,19 @@ StyleImage* CSSImageValue::cachedOrPendingImage() |
return m_image.get(); |
} |
-StyleFetchedImage* CSSImageValue::cachedImage(ResourceFetcher* loader, const ResourceLoaderOptions& options) |
+StyleFetchedImage* CSSImageValue::cachedImage(ResourceFetcher* fetcher, const ResourceLoaderOptions& options, CORSEnabled corsEnabled) |
{ |
- ASSERT(loader); |
+ ASSERT(fetcher); |
if (!m_accessedImage) { |
m_accessedImage = true; |
- FetchRequest request(ResourceRequest(loader->document()->completeURL(m_url)), m_initiatorName.isEmpty() ? FetchInitiatorTypeNames::css : m_initiatorName, options); |
+ FetchRequest request(ResourceRequest(fetcher->document()->completeURL(m_url)), m_initiatorName.isEmpty() ? FetchInitiatorTypeNames::css : m_initiatorName, options); |
- if (options.requestOriginPolicy == PotentiallyCrossOriginEnabled) |
- updateRequestForAccessControl(request.mutableResourceRequest(), loader->document()->securityOrigin(), options.allowCredentials); |
+ if (corsEnabled == PotentiallyCORSEnabled) |
+ updateRequestForAccessControl(request.mutableResourceRequest(), fetcher->document()->securityOrigin(), options.allowCredentials); |
- if (ResourcePtr<ImageResource> cachedImage = loader->fetchImage(request)) |
+ if (ResourcePtr<ImageResource> cachedImage = fetcher->fetchImage(request)) |
m_image = StyleFetchedImage::create(cachedImage.get()); |
} |