Index: third_party/WebKit/Source/platform/graphics/BitmapImage.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp |
index 8788a62448b541c25446cbdcf3b0bc34e93d1bd0..c361c5b307450c79d0bae24ff1cb89d6563ec282 100644 |
--- a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp |
@@ -189,24 +189,21 @@ |
return m_source.getHotSpot(hotSpot); |
} |
-Image::SizeAvailability BitmapImage::setData(PassRefPtr<SharedBuffer> data, bool allDataReceived) |
+bool BitmapImage::setData(PassRefPtr<SharedBuffer> data, bool allDataReceived) |
{ |
if (!data.get()) |
- return SizeAvailable; |
+ return true; |
int length = data->size(); |
if (!length) |
- return SizeAvailable; |
- |
- // If ImageSource::setData() returns Invalid, we know that this is a decode error. |
- // Report size available so that it gets registered as such in ImageResource. |
- if (m_source.setData(*data, allDataReceived) == ImageDecoder::SniffResult::Invalid) |
- return SizeAvailable; |
+ return true; |
+ |
+ m_source.setData(*data, allDataReceived); |
return dataChanged(allDataReceived); |
} |
-Image::SizeAvailability BitmapImage::dataChanged(bool allDataReceived) |
+bool BitmapImage::dataChanged(bool allDataReceived) |
{ |
TRACE_EVENT0("blink", "BitmapImage::dataChanged"); |
@@ -242,7 +239,7 @@ |
m_allDataReceived = allDataReceived; |
m_haveFrameCount = false; |
- return isSizeAvailable() ? SizeAvailable : SizeUnavailable; |
+ return isSizeAvailable(); |
} |
bool BitmapImage::hasColorProfile() const |