Skip to content
  • zoltan@webkit.org's avatar
    [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder · 86e7531e
    zoltan@webkit.org authored
    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: http://svn.webkit.org/repository/webkit/trunk@116085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    86e7531e