Bug 61738

Summary: compilation fails with libpng-1.5
Product: WebKit Reporter: Christoph Mende <angelos>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
patch to use the current API
Updated libpng15 patch
ap: review+
updated ChangeLog entry none

Description Christoph Mende 2011-05-30 10:42:53 PDT
Created attachment 95355 [details]
patch to use the current API

WebCore::writeOutput() in WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp tries to access (struct *png_struct)->io_ptr which is deprecated in libpng-1.4 and removed in 1.5. The new way is to use png_get_io_ptr(). Attached is a patch that uses this function.
Comment 1 Christoph Mende 2011-05-30 12:50:53 PDT
Created attachment 95363 [details]
Updated libpng15 patch
Comment 2 Christoph Mende 2011-05-31 01:08:02 PDT
fyi, from the libpng manual:
The png_get_io_ptr() function has been present since libpng-0.88, has never
changed, and is unaffected by conditional compilation macros.
so this patch is backwards compatible with pretty much every distribution that's newer than 1999.
Comment 3 Alexey Proskuryakov 2011-05-31 15:45:09 PDT
Comment on attachment 95363 [details]
Updated libpng15 patch

View in context: https://bugs.webkit.org/attachment.cgi?id=95363&action=review

> WebCore/ChangeLog:8
> +        No new tests. (OOPS!)

Commit queue can't land the patch with this line. You should just remove it, as it's obvious why no test is needed.

> WebCore/ChangeLog:11
> +        * platform/image-encoders/skia/PNGImageEncoder.cpp:
> +        (WebCore::writeOutput): Use the new API

As you explained in Bugzilla, the API is not new.
Comment 4 Christoph Mende 2011-06-01 00:26:25 PDT
Created attachment 95555 [details]
updated ChangeLog entry
Comment 5 WebKit Review Bot 2011-06-18 12:54:09 PDT
Comment on attachment 95555 [details]
updated ChangeLog entry

Clearing flags on attachment: 95555

Committed r89200: <http://trac.webkit.org/changeset/89200>
Comment 6 WebKit Review Bot 2011-06-18 12:54:13 PDT
All reviewed patches have been landed.  Closing bug.