Bug 13975 - [GDK] Use system-provided libjpeg and libpng
Summary: [GDK] Use system-provided libjpeg and libpng
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-01 20:53 PDT by Alp Toker
Modified: 2007-06-25 05:58 PDT (History)
3 users (show)

See Also:


Attachments
[GDK] Link to external libjpeg (3.56 KB, patch)
2007-06-19 20:54 PDT, Alp Toker
no flags Details | Formatted Diff | Diff
[GDK] Link to external libjpeg and libpng (4.48 KB, patch)
2007-06-19 21:09 PDT, Alp Toker
mrowe: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alp Toker 2007-06-01 20:53:25 PDT
We should avoid using the bundled libjpeg and libpng sources in favour of those provided by the system so that we can reduce memory use and benefit from security updates made to these code bases independently of the WebKit code base.
Comment 1 Kevin Ollivier 2007-06-17 12:03:59 PDT
Created attachment 15090


Sorry for the large patch! :-) This moves the libjpeg sources into a libjpeg subdir of image-decoders/jpeg directory and updates the GDK port makefiles. This way, JPEGImageDecoder.cpp can use a different libjpeg implementation simply by adding it to the include/lib dirs.
Comment 2 Mark Rowe (bdash) 2007-06-18 15:45:30 PDT
Do we really need to keep libjpeg in the WebKit SVN?
Comment 3 Kevin Ollivier 2007-06-18 16:09:01 PDT
Personally, I'm fine with removing it, I just did it this way as I'm not familiar with how to fix the GDK port build system once WebKit's libjpeg is removed, and I wasn't sure if anyone working on the GDK port would have time to deal with this in the near future. 
Comment 4 Alp Toker 2007-06-19 20:54:31 PDT
Created attachment 15134 [details]
[GDK] Link to external libjpeg

This patch updates the Gdk build files to link to the libjpeg shared library.

The bundled libjpeg sources should be removed from the SVN repository when committing this change.

So, after the changes, WebCore/platform/image-decoders/jpeg/ should contain only two files:
  JPEGImageDecoder.cpp  JPEGImageDecoder.h
Comment 5 Alp Toker 2007-06-19 21:09:42 PDT
Created attachment 15135 [details]
[GDK] Link to external libjpeg and libpng

This patch updates the Gdk build files to link to the libjpeg and libpng shared libraries.

The bundled libjpeg and libpng sources should be removed from the SVN repository when committing this change.

So, after the changes, WebCore/platform/image-decoders/jpeg/ should contain
only two files:
  JPEGImageDecoder.cpp  JPEGImageDecoder.h

And WebCore/platform/image-decoders/png/ should contain
only two files:
  PNGImageDecoder.cpp  PNGImageDecoder.h
Comment 6 Charles Gaudette 2007-06-20 16:04:50 PDT
When this gets done, it should clear-up http://bugs.webkit.org/show_bug.cgi?id=12058 also. Right?
Comment 7 Kevin Ollivier 2007-06-20 16:13:11 PDT
yes, libpng will be completely removed from WebKit sources. Of course, it's up to each port to make sure they're using an updated libpng without known vulnerabilities.

Also, should I produce a new patch removing libjpeg and libpng from sources? That plus Alp's latest patch will completely take care of the issue. 
Comment 8 Kevin Ollivier 2007-06-20 16:13:57 PDT
Comment on attachment 15090


We've decided to remove, not move the sources, so this patch is obsolete.
Comment 9 Mark Rowe (bdash) 2007-06-25 05:58:12 PDT
Landed in r23763.