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

Unified Diff: third_party/WebKit/Source/core/css/CSSImageValue.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/CSSImageValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSImageValue.cpp b/third_party/WebKit/Source/core/css/CSSImageValue.cpp
index be304a481be2bf462db677ed3a1749a2f793a5c5..c4d688a31cdd07784fbabd236504ba849bf70834 100644
--- a/third_party/WebKit/Source/core/css/CSSImageValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSImageValue.cpp
@@ -52,8 +52,11 @@ CSSImageValue::CSSImageValue(const AtomicString& absolute_url)
CSSImageValue::~CSSImageValue() {}
-StyleImage* CSSImageValue::CacheImage(const Document& document,
- CrossOriginAttributeValue cross_origin) {
+StyleImage* CSSImageValue::CacheImage(
+ const Document& document,
+ CrossOriginAttributeValue cross_origin,
+ FetchParameters::PlaceholderImageRequestType
+ placeholder_image_request_type) {
if (!cached_image_) {
if (absolute_url_.IsEmpty())
ReResolveURL(document);
@@ -69,7 +72,8 @@ StyleImage* CSSImageValue::CacheImage(const Document& document,
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