[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
pkasting at chromium.org
pkasting at chromium.org
Thu Feb 4 21:28:41 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 24152c6d46b7a93f3247c2826b806fd4fd2505e8
Author: pkasting at chromium.org <pkasting at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 27 02:25:59 2010 +0000
Handle broken images more correctly in the open-source image decoders.
https://bugs.webkit.org/show_bug.cgi?id=33747
Reviewed by David Levin.
No tests since Safari doesn't use these decoders and there's already a
broken-image test in the tree.
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::createFrameAtIndex): No need to check isSizeAvailable() since size() is now always safe.
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::size): Don't assert that the bitmap is valid; we don't need a complete successful decode to be able to give info about the size.
* platform/image-decoders/qt/RGBA32BufferQt.cpp:
(WebCore::RGBA32Buffer::setSize): Don't set the frame to complete on failure, since it's not complete, but empty, and callers can better handle empty frames.
* platform/image-decoders/skia/ImageDecoderSkia.cpp:
(WebCore::RGBA32Buffer::setSize): Don't set the frame to complete on failure, since it's not complete, but empty, and callers can better handle empty frames.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f502490..7a7d0ca 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-01-26 Peter Kasting <pkasting at google.com>
+
+ Reviewed by David Levin.
+
+ Handle broken images more correctly in the open-source image decoders.
+ https://bugs.webkit.org/show_bug.cgi?id=33747
+
+ No tests since Safari doesn't use these decoders and there's already a
+ broken-image test in the tree.
+
+ * platform/graphics/ImageSource.cpp:
+ (WebCore::ImageSource::createFrameAtIndex): No need to check isSizeAvailable() since size() is now always safe.
+ * platform/image-decoders/ImageDecoder.h:
+ (WebCore::ImageDecoder::size): Don't assert that the bitmap is valid; we don't need a complete successful decode to be able to give info about the size.
+ * platform/image-decoders/qt/RGBA32BufferQt.cpp:
+ (WebCore::RGBA32Buffer::setSize): Don't set the frame to complete on failure, since it's not complete, but empty, and callers can better handle empty frames.
+ * platform/image-decoders/skia/ImageDecoderSkia.cpp:
+ (WebCore::RGBA32Buffer::setSize): Don't set the frame to complete on failure, since it's not complete, but empty, and callers can better handle empty frames.
+
2010-01-26 Nikolas Zimmermann <nzimmermann at rim.com>
Not reviewed. Synchronize Qt/Gtk build systems with Mac/Win, should fix Qt compilation. Gtk results still pending.
diff --git a/WebCore/platform/graphics/ImageSource.cpp b/WebCore/platform/graphics/ImageSource.cpp
index bac4f0a..c2366c1 100644
--- a/WebCore/platform/graphics/ImageSource.cpp
+++ b/WebCore/platform/graphics/ImageSource.cpp
@@ -128,7 +128,7 @@ NativeImagePtr ImageSource::createFrameAtIndex(size_t index)
// Zero-height images can cause problems for some ports. If we have an
// empty image dimension, just bail.
- if (!isSizeAvailable() || size().isEmpty())
+ if (size().isEmpty())
return 0;
// Return the buffer contents as a native image. For some ports, the data
diff --git a/WebCore/platform/image-decoders/ImageDecoder.h b/WebCore/platform/image-decoders/ImageDecoder.h
index 85aeb93..b126837 100644
--- a/WebCore/platform/image-decoders/ImageDecoder.h
+++ b/WebCore/platform/image-decoders/ImageDecoder.h
@@ -237,8 +237,6 @@ namespace WebCore {
// Returns the size of the image.
virtual IntSize size() const
{
- // Requesting the size of an invalid bitmap is meaningless.
- ASSERT(!m_failed);
return m_size;
}
diff --git a/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp b/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp
index 5e9b527..d3218cd 100644
--- a/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp
+++ b/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp
@@ -83,11 +83,8 @@ bool RGBA32Buffer::setSize(int newWidth, int newHeight)
m_size = IntSize(newWidth, newHeight);
m_image = QImage(newWidth, newHeight, QImage::Format_ARGB32_Premultiplied);
- if (m_image.isNull()) {
- // Allocation failure, maybe the bitmap was too big.
- setStatus(FrameComplete);
+ if (m_image.isNull())
return false;
- }
// Zero the image.
zeroFill();
diff --git a/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp b/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp
index ea7f227..a8fa995 100644
--- a/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp
+++ b/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp
@@ -67,11 +67,8 @@ bool RGBA32Buffer::setSize(int newWidth, int newHeight)
// otherwise.
ASSERT(width() == 0 && height() == 0);
m_bitmap.setConfig(SkBitmap::kARGB_8888_Config, newWidth, newHeight);
- if (!m_bitmap.allocPixels()) {
- // Allocation failure, maybe the bitmap was too big.
- setStatus(FrameComplete);
+ if (!m_bitmap.allocPixels())
return false;
- }
// Zero the image.
zeroFill();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list