diff options
Diffstat (limited to 'www/webkit-gtk')
-rw-r--r-- | www/webkit-gtk/Makefile | 4 | ||||
-rw-r--r-- | www/webkit-gtk/distinfo | 4 | ||||
-rw-r--r-- | www/webkit-gtk/patches/patch-ab | 67 |
3 files changed, 59 insertions, 16 deletions
diff --git a/www/webkit-gtk/Makefile b/www/webkit-gtk/Makefile index 075fb7b75be..5de1bfc5361 100644 --- a/www/webkit-gtk/Makefile +++ b/www/webkit-gtk/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.33 2011/01/13 13:36:13 wiz Exp $ +# $NetBSD: Makefile,v 1.34 2011/01/15 14:51:26 wiz Exp $ DISTNAME= webkit-1.2.6 PKGNAME= ${DISTNAME:S/webkit/webkit-gtk/} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= www MASTER_SITES= http://www.webkitgtk.org/ diff --git a/www/webkit-gtk/distinfo b/www/webkit-gtk/distinfo index 53357e349d0..fd064035edf 100644 --- a/www/webkit-gtk/distinfo +++ b/www/webkit-gtk/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.23 2011/01/14 12:34:25 wiz Exp $ +$NetBSD: distinfo,v 1.24 2011/01/15 14:51:26 wiz Exp $ SHA1 (webkit-1.2.6.tar.gz) = 0dcfbf7cedda400567f2e081b12987b9d82b33eb RMD160 (webkit-1.2.6.tar.gz) = 84d7101c84f2735744f08b5e8ed684ccf05a59dd Size (webkit-1.2.6.tar.gz) = 6613589 bytes -SHA1 (patch-ab) = 460fd1a9f6c407141f29829ce2ddaee760d98087 +SHA1 (patch-ab) = b28dbc942c3ddcb6309d7c8d3f40871d6d679884 SHA1 (patch-ad) = a5edd3fbff91488d220a3bfeb506865883c912cb SHA1 (patch-af) = 971258e19192d058c4ca580abcbeb3b02f3bf6ce SHA1 (patch-ba) = 4de4994b4e27db0243cca5a2cf409495c3fd382f diff --git a/www/webkit-gtk/patches/patch-ab b/www/webkit-gtk/patches/patch-ab index 41e8cb82f83..8055360944a 100644 --- a/www/webkit-gtk/patches/patch-ab +++ b/www/webkit-gtk/patches/patch-ab @@ -1,4 +1,4 @@ -$NetBSD: patch-ab,v 1.3 2011/01/14 12:34:25 wiz Exp $ +$NetBSD: patch-ab,v 1.4 2011/01/15 14:51:26 wiz Exp $ Fix build with png-1.5. @@ -16,7 +16,47 @@ Fix build with png-1.5. } // Callbacks given to the read struct. The first is for warnings (we want to -@@ -216,18 +220,26 @@ void PNGImageDecoder::headerAvailable() +@@ -139,14 +143,31 @@ public: + + const char* segment; + while (unsigned segmentLength = data.getSomeData(segment, m_readOffset)) { +- m_readOffset += segmentLength; +- m_currentBufferSize = m_readOffset; +- png_process_data(m_png, m_info, reinterpret_cast<png_bytep>(const_cast<char*>(segment)), segmentLength); +- // We explicitly specify the superclass isSizeAvailable() because we +- // merely want to check if we've managed to set the size, not +- // (recursively) trigger additional decoding if we haven't. +- if (sizeOnly ? decoder->ImageDecoder::isSizeAvailable() : decoder->isComplete()) +- return; ++ if (sizeOnly) { ++ while (segmentLength > 0) { ++ // Unfortunately if we read the image at this point it will be ignored, ++ // therefore take small steps through the data until the head is read. ++ // This is crude but effective. ++ m_currentBufferSize = ++m_readOffset; ++ png_process_data(m_png, m_info, reinterpret_cast<png_bytep>(const_cast<char*>(segment)), 1); ++ ++ // We explicitly specify the superclass isSizeAvailable() because we ++ // merely want to check if we've managed to set the size, not ++ // (recursively) trigger additional decoding if we haven't. ++ if (decoder->ImageDecoder::isSizeAvailable()) ++ return; ++ ++ --segmentLength; ++ ++segment; ++ } ++ } else { ++ // Just process the whole segment at once: ++ m_readOffset += segmentLength; ++ m_currentBufferSize = m_readOffset; ++ png_process_data(m_png, m_info, reinterpret_cast<png_bytep>(const_cast<char*>(segment)), segmentLength); ++ if (decoder->isComplete()) ++ return; ++ } + } + if (!decoder->isComplete() && decoder->isAllDataReceived()) + decoder->pngComplete(); +@@ -216,18 +237,26 @@ void PNGImageDecoder::headerAvailable() { png_structp png = m_reader->pngPtr(); png_infop info = m_reader->infoPtr(); @@ -27,7 +67,7 @@ Fix build with png-1.5. // Protect against large images. - if (png->width > cMaxPNGSize || png->height > cMaxPNGSize) { -+ if (png_get_image_width(png, info) > cMaxPNGSize || png_get_image_height(png, info) > cMaxPNGSize) { ++ if (width > cMaxPNGSize || height > cMaxPNGSize) { +#if (PNG_LIBPNG_VER < 10500) longjmp(JMPBUF(png), 1); +#else @@ -46,18 +86,20 @@ Fix build with png-1.5. return; } -@@ -277,8 +289,8 @@ void PNGImageDecoder::headerAvailable() +@@ -274,12 +303,6 @@ void PNGImageDecoder::headerAvailable() + ASSERT(channels == 3 || channels == 4); - if (m_reader->decodingSizeOnly()) { - // If we only needed the size, halt the reader. + m_reader->setHasAlpha(channels == 4); +- +- if (m_reader->decodingSizeOnly()) { +- // If we only needed the size, halt the reader. - m_reader->setReadOffset(m_reader->currentBufferSize() - png->buffer_size); - png->buffer_size = 0; -+ m_reader->setReadOffset(m_reader->currentBufferSize() - png_get_compression_buffer_size(png)); -+ png_set_compression_buffer_size(png, 0); - } +- } } -@@ -291,7 +303,11 @@ void PNGImageDecoder::rowAvailable(unsig + void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, int interlacePass) +@@ -291,7 +314,11 @@ void PNGImageDecoder::rowAvailable(unsig RGBA32Buffer& buffer = m_frameBufferCache[0]; if (buffer.status() == RGBA32Buffer::FrameEmpty) { if (!buffer.setSize(scaledSize().width(), scaledSize().height())) { @@ -69,12 +111,13 @@ Fix build with png-1.5. return; } buffer.setStatus(RGBA32Buffer::FramePartial); -@@ -300,7 +316,7 @@ void PNGImageDecoder::rowAvailable(unsig +@@ -300,7 +327,8 @@ void PNGImageDecoder::rowAvailable(unsig // For PNGs, the frame always fills the entire image. buffer.setRect(IntRect(IntPoint(), size())); - if (m_reader->pngPtr()->interlaced) -+ if (png_get_interlace_type(m_reader->pngPtr(), m_reader->infoPtr()) != PNG_INTERLACE_NONE) ++ if (png_get_interlace_type(m_reader->pngPtr(), m_reader->infoPtr()) ++ != PNG_INTERLACE_NONE) m_reader->createInterlaceBuffer((m_reader->hasAlpha() ? 4 : 3) * size().width() * size().height()); } |