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

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

Issue 2710113002: DO NOT SUBMIT really old prototype of sprite recognition for image replacement
Patch Set: Created 3 years, 10 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/css/CSSImageSetValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp b/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
index 101b62d67d6ef2442b6faf3da49fff62ef44cf90..990d8ba28447611bf65121310761b347165cfd21 100644
--- a/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
@@ -33,6 +33,7 @@
#include "core/fetch/ImageResource.h"
#include "core/fetch/ResourceFetcher.h"
#include "core/fetch/ResourceLoaderOptions.h"
+#include "core/frame/Settings.h"
#include "core/style/StyleFetchedImageSet.h"
#include "core/style/StyleInvalidImage.h"
#include "platform/weborigin/KURL.h"
@@ -100,7 +101,7 @@ StyleImage* CSSImageSetValue::cachedImage(float deviceScaleFactor) const
return m_cachedImage.get();
}
-StyleImage* CSSImageSetValue::cacheImage(const Document& document, float deviceScaleFactor, CrossOriginAttributeValue crossOrigin)
+StyleImage* CSSImageSetValue::cacheImage(const Document& document, float deviceScaleFactor, CrossOriginAttributeValue crossOrigin, ImageResource::PlaceholderRequestType placeholderRequestType)
{
if (!m_imagesInSet.size())
fillImageSet();
@@ -116,7 +117,7 @@ StyleImage* CSSImageSetValue::cacheImage(const Document& document, float deviceS
if (crossOrigin != CrossOriginAttributeNotSet)
request.setCrossOriginAccessControl(document.getSecurityOrigin(), crossOrigin);
- if (ImageResource* cachedImage = ImageResource::fetch(request, document.fetcher()))
+ if (ImageResource* cachedImage = ImageResource::fetch(request, document.fetcher(), placeholderRequestType))
m_cachedImage = StyleFetchedImageSet::create(cachedImage, image.scaleFactor, this, request.url());
else
m_cachedImage = StyleInvalidImage::create(image.imageURL);
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSImageSetValue.h ('k') | third_party/WebKit/Source/core/css/CSSImageValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698