Chromium Code Reviews| Index: third_party/WebKit/Source/core/fetch/ImageResource.cpp |
| diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp |
| index 6ebd8315d925a5caf55530bf8627cac0c344b0cc..5f71f11bc721a499751e7f0c6443285ac3d2be6d 100644 |
| --- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp |
| +++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp |
| @@ -123,11 +123,6 @@ void ImageResource::addObserver(ImageResourceObserver* observer) |
| if (isCacheValidator()) |
| return; |
| - if (m_data && !m_image && !errorOccurred()) { |
| - createImage(); |
| - m_image->setData(m_data, true); |
| - } |
| - |
|
hajimehoshi
2016/06/10 13:30:28
I think it is safe to remove since this was introd
hiroshige
2016/06/15 13:27:01
So can we add
|CHECK(!m_data || m_image)|
here?
hajimehoshi
2016/06/17 09:25:15
Done.
|
| if (m_image && !m_image->isNull()) { |
| observer->imageChanged(this); |
| } |
| @@ -391,7 +386,7 @@ void ImageResource::finish(double loadFinishTime) |
| if (m_data) |
| updateImageAndClearBuffer(); |
| } else { |
| - updateImage(true); |
| + updateImageAndClearBuffer(); |
|
f(malita)
2016/06/10 14:26:43
My understanding of the current impl is that image
hajimehoshi
2016/06/13 09:10:47
I think this doesn't happen with this CL.
|
| } |
| Resource::finish(loadFinishTime); |
| } |
| @@ -500,10 +495,9 @@ void ImageResource::reloadIfLoFi(ResourceFetcher* fetcher) |
| return; |
| m_resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache); |
| m_resourceRequest.setLoFiState(WebURLRequest::LoFiOff); |
| - if (isLoading()) |
| + if (isLoading()) { |
| m_loader->cancel(); |
| - else |
| - updateImageAndClearBuffer(); |
| + } |
| setStatus(NotStarted); |
| fetcher->startLoad(this); |
| } |