| 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 93853b0271992d367300e8e9b9334bc069ff02a5..245732c51b72ed305657f3ebd21f1dc724046318 100644
|
| --- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
|
| +++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
|
| @@ -337,6 +337,31 @@ void ImageResource::updateImage(bool allDataReceived)
|
| }
|
| }
|
|
|
| +void ImageResource::deviceProfileChanged(const blink::Image* image, ColorSpaceProfile* deviceProfile)
|
| +{
|
| + if (!image || image != m_image)
|
| + return;
|
| +
|
| + RELEASE_ASSERT(m_image && m_image->isBitmapImage());
|
| +
|
| + BitmapImage* bitmapImage = toBitmapImage(this->image());
|
| + RELEASE_ASSERT(bitmapImage->hasColorProfile());
|
| +
|
| + bool allDataReceived = bitmapImage->isAllDataReceived();
|
| + if (!bitmapImage->resetDecoder(deviceProfile))
|
| + return;
|
| +
|
| + bool sizeAvailable = m_image->setData(m_data, allDataReceived);
|
| +
|
| + if (sizeAvailable || allDataReceived) {
|
| + if (!m_image || m_image->isNull()) {
|
| + error(errorOccurred() ? status() : DecodeError);
|
| + if (memoryCache()->contains(this))
|
| + memoryCache()->remove(this);
|
| + }
|
| + }
|
| +}
|
| +
|
| void ImageResource::finishOnePart()
|
| {
|
| if (loadingMultipartContent())
|
|
|