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 be304a481be2bf462db677ed3a1749a2f793a5c5..10f88c008e1a77a190f00677769f56194af7a5a7 100644 |
| --- a/third_party/WebKit/Source/core/css/CSSImageValue.cpp |
| +++ b/third_party/WebKit/Source/core/css/CSSImageValue.cpp |
| @@ -22,6 +22,7 @@ |
| #include "core/css/CSSMarkup.h" |
| #include "core/dom/Document.h" |
| +#include "core/dom/TaskRunnerHelper.h" |
| #include "core/frame/Settings.h" |
| #include "core/loader/resource/ImageResourceContent.h" |
| #include "core/style/StyleFetchedImage.h" |
| @@ -72,8 +73,10 @@ StyleImage* CSSImageValue::CacheImage(const Document& document, |
| document.GetSettings()->GetFetchImagePlaceholders()) |
| params.SetAllowImagePlaceholder(); |
| - if (ImageResourceContent* cached_image = |
| - ImageResourceContent::Fetch(params, document.Fetcher())) { |
| + RefPtr<WebTaskRunner> task_runner = TaskRunnerHelper::Get( |
| + TaskType::kAnimationTimer, const_cast<Document*>(&document)); |
|
Dan Elphick
2017/04/27 14:41:39
more const_cast here:(
|
| + if (ImageResourceContent* cached_image = ImageResourceContent::Fetch( |
| + task_runner, params, document.Fetcher())) { |
| cached_image_ = |
| StyleFetchedImage::Create(cached_image, document, params.Url()); |
| } else { |