Chromium Code Reviews| 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 55b987308ca1a4c725c5432138dcff214305ce82..dc5e7869d9bab06859421ab5b48c25f389d3154b 100644 |
| --- a/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp |
| +++ b/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp |
| @@ -30,6 +30,7 @@ |
| #include "core/css/CSSPrimitiveValue.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/StyleFetchedImageSet.h" |
| #include "core/style/StyleInvalidImage.h" |
| @@ -101,6 +102,7 @@ StyleImage* CSSImageSetValue::CachedImage(float device_scale_factor) const { |
| StyleImage* CSSImageSetValue::CacheImage( |
| const Document& document, |
| float device_scale_factor, |
| + FetchParameters::PlaceholderImageRequestType placeholder_image_request_type, |
| CrossOriginAttributeValue cross_origin) { |
| if (!images_in_set_.size()) |
| FillImageSet(); |
| @@ -122,7 +124,9 @@ StyleImage* CSSImageSetValue::CacheImage( |
| params.SetCrossOriginAccessControl(document.GetSecurityOrigin(), |
| cross_origin); |
| } |
| - if (document.GetFrame()) |
| + if (document.GetFrame() && document.GetSettings() && |
| + 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 = |