[Webkit-unassigned] [Bug 54406] png-1.5 fixes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 19 07:23:13 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=54406


Patrick R. Gansterer <paroga at paroga.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |paroga at paroga.com
     Ever Confirmed|0                           |1




--- Comment #2 from Patrick R. Gansterer <paroga at paroga.com>  2011-02-19 07:23:13 PST ---
View in context: https://bugs.webkit.org/attachment.cgi?id=82349&action=review

Welcome to the WebKit bugzilla and thx for the patch.
Every patch requries a ChangeLog and should be based on the trunk version, so it can apply on the tree. For more information about contributing to WebKit see http://www.webkit.org/coding/contributing.html. FYI: If you set the review flag to "?" your patch gets better attention and the EWS (the bubbles beside the attachment) fill process it.

> WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:67
> +#if (PNG_LIBPNG_VER < 10500)
>      longjmp(JMPBUF(png), 1);
> +#else
> +    png_longjmp(png, 1);
> +#endif

You use this many times in you code. IMHO sth like the following on top of the file would be better:
#if (PNG_LIBPNG_VER >= 10500)
static void png_longjmp(png_structp png, int value)
{
     longjmp(JMPBUF(png), value)
}
#endif

> WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:292
> -        m_reader->setReadOffset(m_reader->currentBufferSize() - png->buffer_size);
> -        png->buffer_size = 0;
> +        m_reader->setReadOffset(m_reader->currentBufferSize() - png_process_data_pause(png, 0/*do not save the data*/));

png_process_data_pause doesn't exist in the "old" libpng.

> WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:320
> -        if (m_reader->pngPtr()->interlaced)
> +        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());

Please write the if in only one line.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list