[Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
authorzoltan@webkit.org <zoltan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 May 2012 12:10:26 +0000 (12:10 +0000)
committerzoltan@webkit.org <zoltan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 May 2012 12:10:26 +0000 (12:10 +0000)
commit4701771d74483e7b2f4abdd3d6e9d190657cc05b
tree226710fa94cf7eac5100db13ac42d86596e07080
parent6d29ddffc27c9e14983e1fc45a5d4e2374d99fe4
[Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
https://bugs.webkit.org/show_bug.cgi?id=80400

Source/WebCore:

This change modifies the default ImageDecoder for Qt-port from QImageDecoder to WebCore ImageDecoder.
The new behavior is to use QImageDecoder only if WebCoreImageDecoder doesn't support the requested
image type.
The WTF_USE_QT_IMAGE_DECODER macro has been removed, since it is no longer needed.

This change adds build depedency for libpng-dev and libjpeg-dev packages, becuase PNG and JPEG imagedecoders
need not only these libraries, but their headers also. Qmake-config tests for these libraries were
introduced in r110045.

Reviewed by Simon Hausmann.

No new tests needed.

* Target.pri: Move WebCore ImageDecoder files out of guards. Remove ImageFrameQt.cpp from sources.
* WebCore.pri: Move WebCore ImageDecoder include paths out of guards.
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes): Add WebCore supported and Qt supported MIME types.
(WebCore::initializeSupportedImageMIMETypesForEncoding): Use Qt supported MIME types.
* platform/graphics/ImageSource.cpp: Remove unnecessary includes.
* platform/graphics/ImageSource.h: Remove unnecessary typedefs.
(WebCore):
* platform/graphics/qt/ImageDecoderQt.cpp:
(WebCore::ImageDecoderQt::filenameExtension): Remove unnecessary semicolon.
(WebCore::ImageDecoderQt::internalHandleCurrentImage): Use QImage and ImageFrame instead of QPixmap.
(WebCore):
(WebCore::ImageFrame::asNewNativeImage): Moved here from removed ImageFrameQt.cpp.
* platform/image-decoders/ImageDecoder.cpp: Reorganize the includes of the header.
(WebCore::ImageDecoder::create): Add platform macro guarded fallback case for QImageDecoder.
* platform/image-decoders/ImageDecoder.h: Remove Qt-specific codes.
(WebCore::ImageFrame::getAddr): Remove Qt-specific case, since it is no longer needed.
(ImageFrame):
* platform/image-decoders/qt/ImageFrameQt.cpp: Removed. Dead code, other code has been moved to
ImageDecoderQt.cpp.

Source/WebKit/blackberry:

Get rid off QT_IMAGE_DECODER flag.

Reviewed by Simon Hausmann.

* WebCoreSupport/AboutDataEnableFeatures.in:

Tools:

Remove WTF_USE_QT_IMAGE_DECODER macro.

Reviewed by Simon Hausmann.

* qmake/mkspecs/features/features.prf:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Target.pri [changed mode: 0644->0755]
Source/WebCore/WebCore.pri [changed mode: 0644->0755]
Source/WebCore/platform/MIMETypeRegistry.cpp
Source/WebCore/platform/graphics/ImageSource.cpp [changed mode: 0644->0755]
Source/WebCore/platform/graphics/ImageSource.h [changed mode: 0644->0755]
Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp [changed mode: 0644->0755]
Source/WebCore/platform/graphics/qt/ImageDecoderQt.h [changed mode: 0644->0755]
Source/WebCore/platform/image-decoders/ImageDecoder.cpp [changed mode: 0644->0755]
Source/WebCore/platform/image-decoders/ImageDecoder.h [changed mode: 0644->0755]
Source/WebCore/platform/image-decoders/qt/ImageFrameQt.cpp [deleted file]
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/AboutDataEnableFeatures.in
Tools/ChangeLog
Tools/qmake/mkspecs/features/features.prf