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 c361c5b307450c79d0bae24ff1cb89d6563ec282..d786de022cd23c6af1fb680a211ecad441f39829 100644 |
--- a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp |
@@ -198,7 +198,11 @@ bool BitmapImage::setData(PassRefPtr<SharedBuffer> data, bool allDataReceived) |
if (!length) |
return true; |
- m_source.setData(*data, allDataReceived); |
+ // If setData() returns InvalidData, we know that this is a decode error. |
pdr.
2016/07/21 04:39:06
Nit: "If ImageSource::setData returns Invalid, we
Nate Chapin
2016/07/21 20:59:05
Done.
|
+ // Report size available so that it gets registered as such in |
+ // ImageResource. |
+ if (m_source.setData(*data, allDataReceived) == ImageDecoder::SniffResult::Invalid) |
+ return true; |
return dataChanged(allDataReceived); |
pdr.
2016/07/21 04:39:06
Not your fault, but would you mind changing the re
Nate Chapin
2016/07/21 20:59:05
Went with 'enum SizeAvailability' inside the Image
|
} |