Chromium Code Reviews| 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 10127663d8855e72b8396f52a452fd4df0629f19..b5fbf7beb784e133c4648f15cdd043a90af76ef9 100644 |
| --- a/third_party/WebKit/Source/core/css/CSSImageValue.cpp |
| +++ b/third_party/WebKit/Source/core/css/CSSImageValue.cpp |
| @@ -23,6 +23,7 @@ |
| #include "core/css/CSSMarkup.h" |
| #include "core/dom/Document.h" |
| #include "core/frame/LocalFrame.h" |
| +#include "core/frame/Settings.h" |
| #include "core/loader/resource/ImageResourceContent.h" |
| #include "core/style/StyleFetchedImage.h" |
| #include "core/style/StyleInvalidImage.h" |
| @@ -53,8 +54,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 +75,9 @@ StyleImage* CSSImageValue::CacheImage(const Document& document, |
| params.SetCrossOriginAccessControl(document.GetSecurityOrigin(), |
| cross_origin); |
| } |
| - if (document.GetFrame()) |
| + if (document.GetFrame() && |
| + document.GetSettings()->GetFetchImagePlaceholders() && |
|
sclittle
2017/06/13 00:28:27
Could you remove the Settings checks here? That lo
rajendrant
2017/06/21 19:00:57
Done.
|
| + placeholder_image_request_type == FetchParameters::kAllowPlaceholder) |
| document.GetFrame()->MaybeAllowImagePlaceholder(params); |
| if (ImageResourceContent* cached_image = |