Bug 61738 - compilation fails with libpng-1.5
Summary: compilation fails with libpng-1.5
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-30 10:42 PDT by Christoph Mende
Modified: 2011-06-18 12:54 PDT (History)
1 user (show)

See Also:


Attachments
patch to use the current API (643 bytes, patch)
2011-05-30 10:42 PDT, Christoph Mende
no flags Details | Formatted Diff | Diff
Updated libpng15 patch (1.27 KB, patch)
2011-05-30 12:50 PDT, Christoph Mende
ap: review+
Details | Formatted Diff | Diff
updated ChangeLog entry (1.27 KB, patch)
2011-06-01 00:26 PDT, Christoph Mende
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.