WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
33287
PNGEncoder.cpp lacks support for libpng 1.4
https://bugs.webkit.org/show_bug.cgi?id=33287
Summary
PNGEncoder.cpp lacks support for libpng 1.4
John Bowler
Reported
2010-01-06 19:52:19 PST
Certain NULL macros were removed from png.h between 1.2 and 1.4, this patch fixes it (you probably want to use your favourite NULL definition, not 0). --- chromium-4.0.251.0/third_party/WebKit/WebCore/platform/image-encoders/skia/orig/PNGImageEncoder.cpp 2009-11-19 13:39:07.000000000 -0800 +++ chromium-4.0.251.0/third_party/WebKit/WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp 2009-11-19 13:39:25.000000000 -0800 @@ -130,9 +130,9 @@ } png_struct* pngPtr = png_create_write_struct(PNG_LIBPNG_VER_STRING, - png_voidp_NULL, - png_error_ptr_NULL, - png_error_ptr_NULL); + 0, + 0, + 0); if (!pngPtr) return false;
Attachments
libpng.patch
(1.50 KB, patch)
2010-04-29 06:52 PDT
,
Pawel Hajdan jr (ph)
jorlow
: review-
Details
Formatted Diff
Diff
libpng.patch
(1.39 KB, patch)
2010-04-29 07:18 PDT
,
Pawel Hajdan jr (ph)
jorlow
: review-
jorlow
: commit-queue-
Details
Formatted Diff
Diff
libpng.patch
(1.44 KB, patch)
2010-04-29 07:29 PDT
,
Pawel Hajdan jr (ph)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Peter Kasting
Comment 1
2010-04-28 14:00:22 PDT
I would r+ this if I were a reviewer. Make a real patch with a ChangeLog and ask for review. (I'd do that too, but I'm on vacation ATM.)
Evan Martin
Comment 2
2010-04-28 14:11:37 PDT
I will make this a WK patch if Paweł doesn't want to.
Pawel Hajdan jr (ph)
Comment 3
2010-04-29 06:52:54 PDT
Created
attachment 54696
[details]
libpng.patch
Jeremy Orlow
Comment 4
2010-04-29 07:08:54 PDT
Comment on
attachment 54696
[details]
libpng.patch This change log would be more standard. Note the moved url. """ 2010-04-29 PaweÅ Hajdan, Jr. <
phajdan.jr@chromium.org
> Reviewed by NOBODY (OOPS!). Fix building with libpng-1.4.
https://bugs.webkit.org/show_bug.cgi?id=33287
No new tests (no behavior change). Original patch by John Bowler <
jbowler@acm.org
> * platform/image-encoders/skia/PNGImageEncoder.cpp: (WebCore::PNGImageEncoder::encode): """
> png_struct* pngPtr = png_create_write_struct(PNG_LIBPNG_VER_STRING, > - png_voidp_NULL, > - png_error_ptr_NULL, > - png_error_ptr_NULL); > + 0, > + 0, > + 0);
Put all of these values on one line.
Pawel Hajdan jr (ph)
Comment 5
2010-04-29 07:18:44 PDT
Created
attachment 54700
[details]
libpng.patch Fixes jorlow's review comments.
Jeremy Orlow
Comment 6
2010-04-29 07:21:44 PDT
Comment on
attachment 54700
[details]
libpng.patch
> Index: WebCore/ChangeLog > =================================================================== > --- WebCore/ChangeLog (revision 58506) > +++ WebCore/ChangeLog (working copy) > @@ -1,3 +1,17 @@ > +2010-04-29 PaweÅ Hajdan, Jr. <
phajdan.jr@chromium.org
> > + > + Reviewed by NOBODY (OOPS!). > + > + Fix building with libpng-1.4. > +
https://bugs.webkit.org/show_bug.cgi?id=33287
> + > + No new tests (no behavior change). > + > + Original patch by John Bowler <
jbowler@acm.org
> > + > + * platform/image-encoders/skia/PNGImageEncoder.cpp: > + (WebCore::PNGImageEncoder::encode): > + > 2010-04-29 Kwang Yul Seo <
skyul@company100.net
> > > Reviewed by Simon Hausmann. > Index: WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp > =================================================================== > --- WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp (revision 58494) > +++ WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp (working copy) > @@ -130,9 +130,7 @@ bool PNGImageEncoder::encode(const unsig > } > > png_struct* pngPtr = png_create_write_struct(PNG_LIBPNG_VER_STRING, > - png_voidp_NULL, > - png_error_ptr_NULL, > - png_error_ptr_NULL); > + 0, 0, 0);
Sorry I wasn't clear, but the line needs to look like this: "png_struct* pngPtr = png_create_write_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);" The original line was not in WebKit style.
Pawel Hajdan jr (ph)
Comment 7
2010-04-29 07:29:03 PDT
Created
attachment 54704
[details]
libpng.patch No problem, please just take another look.
Jeremy Orlow
Comment 8
2010-04-29 07:30:11 PDT
Comment on
attachment 54704
[details]
libpng.patch Sweet!!
WebKit Commit Bot
Comment 9
2010-04-29 08:46:59 PDT
Comment on
attachment 54704
[details]
libpng.patch Clearing flags on attachment: 54704 Committed
r58519
: <
http://trac.webkit.org/changeset/58519
>
WebKit Commit Bot
Comment 10
2010-04-29 08:47:05 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug