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

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

Issue 2795173002: Do not show image placeholders for CSS sprites (Closed)
Patch Set: Addressed kouhei comments Created 3 years, 8 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 a1fdbd14778d3dff499a62718d1cdd1314636808..ddeab1b7376cb021196a7d355ca79879d16bf8c0 100644
--- a/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
@@ -101,7 +101,9 @@ StyleImage* CSSImageSetValue::CachedImage(float device_scale_factor) const {
StyleImage* CSSImageSetValue::CacheImage(
const Document& document,
float device_scale_factor,
- CrossOriginAttributeValue cross_origin) {
+ CrossOriginAttributeValue cross_origin,
+ FetchParameters::PlaceholderImageRequestType
+ placeholder_image_request_type) {
if (!images_in_set_.size())
FillImageSet();
@@ -120,7 +122,8 @@ StyleImage* CSSImageSetValue::CacheImage(
cross_origin);
}
if (document.GetSettings() &&
- document.GetSettings()->GetFetchImagePlaceholders())
+ document.GetSettings()->GetFetchImagePlaceholders() &&
+ placeholder_image_request_type == FetchParameters::kAllowPlaceholder)
params.SetAllowImagePlaceholder();
if (ImageResourceContent* cached_image =

Powered by Google App Engine
This is Rietveld 408576698