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

Unified Diff: third_party/WebKit/Source/core/css/CSSImageValue.cpp

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: style Created 4 years 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/css/CSSImageValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSImageValue.cpp b/third_party/WebKit/Source/core/css/CSSImageValue.cpp
index a0dd40cc494d381fd9bcc1ec7cca007b6265d58e..727f81c9e994421ec47e53b8846c195abd0d39c3 100644
--- a/third_party/WebKit/Source/core/css/CSSImageValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSImageValue.cpp
@@ -24,7 +24,7 @@
#include "core/dom/Document.h"
#include "core/fetch/FetchInitiatorTypeNames.h"
#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ImageResource.h"
+#include "core/fetch/ImageResourceContent.h"
#include "core/fetch/ResourceFetcher.h"
#include "core/frame/Settings.h"
#include "core/style/StyleFetchedImage.h"
@@ -67,8 +67,8 @@ StyleImage* CSSImageValue::cacheImage(const Document& document,
if (document.settings() && document.settings()->fetchImagePlaceholders())
request.setAllowImagePlaceholder();
- if (ImageResource* cachedImage =
- ImageResource::fetch(request, document.fetcher()))
+ if (ImageResourceContent* cachedImage =
+ ImageResourceContent::fetch(request, document.fetcher()))
m_cachedImage =
StyleFetchedImage::create(cachedImage, document, request.url());
else
@@ -83,13 +83,12 @@ void CSSImageValue::restoreCachedResourceIfNeeded(
if (!m_cachedImage || !document.fetcher() || m_absoluteURL.isNull())
return;
- ImageResource* resource = m_cachedImage->cachedImage();
+ ImageResourceContent* resource = m_cachedImage->cachedImage();
if (!resource)
return;
- document.fetcher()->emulateLoadStartedForInspector(
- resource, KURL(ParsedURLString, m_absoluteURL),
- WebURLRequest::RequestContextImage,
+ resource->emulateLoadStartedForInspector(
+ document.fetcher(), KURL(ParsedURLString, m_absoluteURL),
m_initiatorName.isEmpty() ? FetchInitiatorTypeNames::css
: m_initiatorName);
}
@@ -97,7 +96,7 @@ void CSSImageValue::restoreCachedResourceIfNeeded(
bool CSSImageValue::hasFailedOrCanceledSubresources() const {
if (!m_cachedImage)
return false;
- if (Resource* cachedResource = m_cachedImage->cachedImage())
+ if (ImageResourceContent* cachedResource = m_cachedImage->cachedImage())
return cachedResource->loadFailedOrCanceled();
return true;
}
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSImageSetValue.cpp ('k') | third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698