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

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

Issue 2795173002: Do not show image placeholders for CSS sprites (Closed)
Patch Set: remove a test Created 3 years, 6 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 367a9f058bd7b0e4075f0a21c69392d74f8a4e33..b3304674bd02b69b2cc405fc98377b091e9f0efa 100644
--- a/third_party/WebKit/Source/core/css/CSSImageValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSImageValue.cpp
@@ -53,8 +53,10 @@ CSSImageValue::CSSImageValue(const AtomicString& absolute_url)
CSSImageValue::~CSSImageValue() {}
-StyleImage* CSSImageValue::CacheImage(const Document& document,
- CrossOriginAttributeValue cross_origin) {
+StyleImage* CSSImageValue::CacheImage(
+ const Document& document,
+ FetchParameters::PlaceholderImageRequestType placeholder_image_request_type,
+ CrossOriginAttributeValue cross_origin) {
if (!cached_image_) {
if (absolute_url_.IsEmpty())
ReResolveURL(document);
@@ -72,7 +74,8 @@ StyleImage* CSSImageValue::CacheImage(const Document& document,
cross_origin);
}
- if (document.GetFrame())
+ if (document.GetFrame() &&
+ placeholder_image_request_type == FetchParameters::kAllowPlaceholder)
document.GetFrame()->MaybeAllowImagePlaceholder(params);
if (ImageResourceContent* cached_image =

Powered by Google App Engine
This is Rietveld 408576698