Simplify patch to match more closely what has been submitted upstream.
This commit is contained in:
parent
5eb169714a
commit
cf7023081c
2 changed files with 4 additions and 36 deletions
|
@ -1,8 +1,8 @@
|
|||
$NetBSD: distinfo,v 1.28 2011/02/14 20:05:54 wiz Exp $
|
||||
$NetBSD: distinfo,v 1.29 2011/02/27 23:42:09 wiz Exp $
|
||||
|
||||
SHA1 (webkit-1.2.7.tar.gz) = e9afc573d2459794c3749ba404f2187f9dcc9ed3
|
||||
RMD160 (webkit-1.2.7.tar.gz) = f36b3ae05693e0eeb4d1936ceee52b6fe1517e57
|
||||
Size (webkit-1.2.7.tar.gz) = 6615990 bytes
|
||||
SHA1 (patch-ab) = 188568a65452b66a23fccd50f7962e825801a529
|
||||
SHA1 (patch-ab) = 92a6d6e0def4c3fd77a692a199359255319f7f21
|
||||
SHA1 (patch-ad) = ef727a30bf78b747402a23fea7bddcc37d70e77d
|
||||
SHA1 (patch-af) = 7971cf7d873703e17c002fa660a949f6f6d1c684
|
||||
|
|
|
@ -1,23 +1,11 @@
|
|||
$NetBSD: patch-ab,v 1.7 2011/02/14 20:05:54 wiz Exp $
|
||||
$NetBSD: patch-ab,v 1.8 2011/02/27 23:42:10 wiz Exp $
|
||||
|
||||
Fix build with png-1.5. From John Bowler.
|
||||
https://bugs.webkit.org/show_bug.cgi?id=54406
|
||||
|
||||
--- WebCore/platform/image-decoders/png/PNGImageDecoder.cpp.orig 2010-12-28 12:28:51.000000000 +0000
|
||||
+++ WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
|
||||
@@ -60,7 +60,11 @@ const unsigned long cMaxPNGSize = 100000
|
||||
// Called if the decoding of the image fails.
|
||||
static void PNGAPI decodingFailed(png_structp png, png_const_charp)
|
||||
{
|
||||
+#if (PNG_LIBPNG_VER < 10500)
|
||||
longjmp(JMPBUF(png), 1);
|
||||
+#else
|
||||
+ png_longjmp(png, 1);
|
||||
+#endif
|
||||
}
|
||||
|
||||
// Callbacks given to the read struct. The first is for warnings (we want to
|
||||
@@ -216,18 +220,26 @@ void PNGImageDecoder::headerAvailable()
|
||||
@@ -216,18 +220,18 @@ void PNGImageDecoder::headerAvailable()
|
||||
{
|
||||
png_structp png = m_reader->pngPtr();
|
||||
png_infop info = m_reader->infoPtr();
|
||||
|
@ -29,21 +17,13 @@ https://bugs.webkit.org/show_bug.cgi?id=54406
|
|||
// Protect against large images.
|
||||
- if (png->width > cMaxPNGSize || png->height > cMaxPNGSize) {
|
||||
+ if (width > cMaxPNGSize || height > cMaxPNGSize) {
|
||||
+#if (PNG_LIBPNG_VER < 10500)
|
||||
longjmp(JMPBUF(png), 1);
|
||||
+#else
|
||||
+ png_longjmp(png, 1);
|
||||
+#endif
|
||||
return;
|
||||
}
|
||||
|
||||
// We can fill in the size now that the header is available.
|
||||
if (!setSize(width, height)) {
|
||||
+#if (PNG_LIBPNG_VER < 10500)
|
||||
longjmp(JMPBUF(png), 1);
|
||||
+#else
|
||||
+ png_longjmp(png, 1);
|
||||
+#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -57,18 +37,6 @@ https://bugs.webkit.org/show_bug.cgi?id=54406
|
|||
}
|
||||
}
|
||||
|
||||
@@ -291,7 +302,11 @@ void PNGImageDecoder::rowAvailable(unsig
|
||||
RGBA32Buffer& buffer = m_frameBufferCache[0];
|
||||
if (buffer.status() == RGBA32Buffer::FrameEmpty) {
|
||||
if (!buffer.setSize(scaledSize().width(), scaledSize().height())) {
|
||||
+#if (PNG_LIBPNG_VER < 10500)
|
||||
longjmp(JMPBUF(m_reader->pngPtr()), 1);
|
||||
+#else
|
||||
+ png_longjmp(m_reader->pngPtr(), 1);
|
||||
+#endif
|
||||
return;
|
||||
}
|
||||
buffer.setStatus(RGBA32Buffer::FramePartial);
|
||||
@@ -300,7 +315,8 @@ void PNGImageDecoder::rowAvailable(unsig
|
||||
// For PNGs, the frame always fills the entire image.
|
||||
buffer.setRect(IntRect(IntPoint(), size()));
|
||||
|
|
Loading…
Reference in a new issue