Unreviewed, rolling out r108685.
authorenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 00:03:29 +0000 (00:03 +0000)
committerenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 00:03:29 +0000 (00:03 +0000)
http://trac.webkit.org/changeset/108685
https://bugs.webkit.org/show_bug.cgi?id=79414

Broke Chromium builds (Requested by enne on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-02-23

Source/WebCore:

* Target.pri:
* WebCore.pri:
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes):
(WebCore::initializeSupportedImageMIMETypesForEncoding):
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageFrame::getAddr):
(ImageFrame):
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore):
* platform/image-decoders/qt/ImageFrameQt.cpp:

Tools:

* qmake/mkspecs/features/features.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108692 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Target.pri
Source/WebCore/WebCore.pri
Source/WebCore/platform/MIMETypeRegistry.cpp
Source/WebCore/platform/image-decoders/ImageDecoder.h
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
Source/WebCore/platform/image-decoders/qt/ImageFrameQt.cpp
Tools/ChangeLog
Tools/qmake/mkspecs/features/features.prf

index 3cf3d4b..4a14bcf 100644 (file)
@@ -1,3 +1,24 @@
+2012-02-23  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r108685.
+        http://trac.webkit.org/changeset/108685
+        https://bugs.webkit.org/show_bug.cgi?id=79414
+
+        Broke Chromium builds (Requested by enne on #webkit).
+
+        * Target.pri:
+        * WebCore.pri:
+        * platform/MIMETypeRegistry.cpp:
+        (WebCore::initializeSupportedImageMIMETypes):
+        (WebCore::initializeSupportedImageMIMETypesForEncoding):
+        * platform/image-decoders/ImageDecoder.h:
+        (WebCore::ImageFrame::getAddr):
+        (ImageFrame):
+        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+        * platform/image-decoders/png/PNGImageDecoder.cpp:
+        (WebCore):
+        * platform/image-decoders/qt/ImageFrameQt.cpp:
+
 2012-02-23  Koji Ishii  <kojiishi@gmail.com>
 
         CSS2:text-decoration: <rt> element should not inherit text-decoration property
index 9e567bc..9cce035 100644 (file)
@@ -2191,6 +2191,7 @@ HEADERS += \
     platform/graphics/Region.h \
     platform/graphics/RoundedRect.h \
     platform/graphics/qt/FontCustomPlatformData.h \
+    platform/graphics/qt/ImageDecoderQt.h \
     platform/graphics/qt/StillImageQt.h \
     platform/graphics/qt/TransparencyLayer.h \
     platform/graphics/SegmentedFontData.h \
@@ -2801,6 +2802,7 @@ SOURCES += \
     platform/graphics/qt/GraphicsContextQt.cpp \
     platform/graphics/qt/IconQt.cpp \
     platform/graphics/qt/ImageBufferQt.cpp \
+    platform/graphics/qt/ImageDecoderQt.cpp \
     platform/graphics/qt/ImageQt.cpp \
     platform/graphics/qt/IntPointQt.cpp \
     platform/graphics/qt/IntRectQt.cpp \
@@ -3936,35 +3938,6 @@ contains(DEFINES, ENABLE_MHTML=1) {
         page/PageSerializer.cpp
 }
 
-contains(DEFINES, ENABLE_QT_IMAGE_DECODER=1) {
-    HEADERS += platform/graphics/qt/ImageDecoderQt.h
-    SOURCES += platform/graphics/qt/ImageDecoderQt.cpp
-} else {
-    HEADERS += \
-        platform/image-decoders/bmp/BMPImageDecoder.h \
-        platform/image-decoders/bmp/BMPImageReader.h \
-        platform/image-decoders/gif/GIFImageDecoder.h \
-        platform/image-decoders/gif/GIFImageReader.h\
-        platform/image-decoders/ico/ICOImageDecoder.h \
-        platform/image-decoders/jpeg/JPEGImageDecoder.h \
-        platform/image-decoders/png/PNGImageDecoder.h
-
-    SOURCES += \
-        platform/image-decoders/ImageDecoder.cpp \
-        platform/image-decoders/bmp/BMPImageDecoder.cpp \
-        platform/image-decoders/bmp/BMPImageReader.cpp \
-        platform/image-decoders/gif/GIFImageDecoder.cpp \
-        platform/image-decoders/gif/GIFImageReader.cpp\
-        platform/image-decoders/ico/ICOImageDecoder.cpp \
-        platform/image-decoders/jpeg/JPEGImageDecoder.cpp \
-        platform/image-decoders/png/PNGImageDecoder.cpp
-
-    contains(DEFINES, WTF_USE_WEBP=1) {
-        HEADERS += platform/image-decoders/webp/WEBPImageDecoder.h
-        SOURCES += platform/image-decoders/webp/WEBPImageDecoder.cpp
-    }
-}
-
 !system-sqlite:exists( $${SQLITE3SRCDIR}/sqlite3.c ) {
     # Build sqlite3 into WebCore from source
     # somewhat copied from $$QT_SOURCE_TREE/src/plugins/sqldrivers/sqlite/sqlite.pro
index a3b7be4..af9941a 100644 (file)
@@ -203,22 +203,6 @@ contains(CONFIG, texmap) {
     LIBS += -lsqlite3
 }
 
-contains(DEFINES, ENABLE_QT_IMAGE_DECODER=0) {
-    INCLUDEPATH += \
-        $$SOURCE_DIR/platform/image-decoders/bmp \
-        $$SOURCE_DIR/platform/image-decoders/gif \
-        $$SOURCE_DIR/platform/image-decoders/ico \
-        $$SOURCE_DIR/platform/image-decoders/jpeg \
-        $$SOURCE_DIR/platform/image-decoders/png
-
-    LIBS += -ljpeg -lpng12
-
-    contains(DEFINES, WTF_USE_WEBP=1) {
-        INCLUDEPATH += $$SOURCE_DIR/platform/image-decoders/webp
-        LIBS += -lwebp
-    }
-}
-
 win32-*|wince* {
     DLLDESTDIR = $${ROOT_BUILD_DIR}/bin
 
index cbb0aae..b5f2d45 100644 (file)
@@ -39,7 +39,7 @@
 #include <ApplicationServices/ApplicationServices.h>
 #include <wtf/RetainPtr.h>
 #endif
-#if PLATFORM(QT) && ENABLE(QT_IMAGE_DECODER)
+#if PLATFORM(QT)
 #include <qimagereader.h>
 #include <qimagewriter.h>
 #endif
@@ -229,7 +229,7 @@ static void initializeSupportedImageMIMETypes()
     supportedImageMIMETypes->remove("application/pdf");
     supportedImageMIMETypes->remove("application/postscript");
 
-#elif PLATFORM(QT) && ENABLE(QT_IMAGE_DECODER)
+#elif PLATFORM(QT)
     QList<QByteArray> formats = QImageReader::supportedImageFormats();
     for (size_t i = 0; i < static_cast<size_t>(formats.size()); ++i) {
 #if ENABLE(SVG)
@@ -289,7 +289,7 @@ static void initializeSupportedImageMIMETypesForEncoding()
     supportedImageMIMETypesForEncoding->add("image/jpeg");
     supportedImageMIMETypesForEncoding->add("image/gif");
 #endif
-#elif PLATFORM(QT) && ENABLE(QT_IMAGE_DECODER)
+#elif PLATFORM(QT)
     QList<QByteArray> formats = QImageWriter::supportedImageFormats();
     for (int i = 0; i < formats.size(); ++i) {
         String mimeType = MIMETypeRegistry::getMIMETypeForExtension(formats.at(i).constData());
index 2910a5e..9d9b34f 100644 (file)
@@ -64,7 +64,7 @@ namespace WebCore {
             DisposeOverwritePrevious  // Clear frame to previous framebuffer
                                       // contents
         };
-#if USE(SKIA) || (PLATFORM(QT) && ENABLE(QT_IMAGE_DECODER))
+#if USE(SKIA) || PLATFORM(QT)
         typedef uint32_t PixelData;
 #else
         typedef unsigned PixelData;
@@ -140,7 +140,7 @@ namespace WebCore {
         {
 #if USE(SKIA)
             return m_bitmap.bitmap().getAddr32(x, y);
-#elif PLATFORM(QT) && ENABLE(QT_IMAGE_DECODER)
+#elif PLATFORM(QT)
             m_image = m_pixmap.toImage();
             m_pixmap = QPixmap();
             return reinterpret_cast_ptr<QRgb*>(m_image.scanLine(y)) + x;
@@ -149,7 +149,7 @@ namespace WebCore {
 #endif
         }
 
-#if PLATFORM(QT) && ENABLE(QT_IMAGE_DECODER)
+#if PLATFORM(QT)
         void setPixmap(const QPixmap& pixmap);
 #endif
 
@@ -190,7 +190,7 @@ namespace WebCore {
 #if PLATFORM(CHROMIUM) && OS(DARWIN)
         ColorProfile m_colorProfile;
 #endif
-#elif PLATFORM(QT) && ENABLE(QT_IMAGE_DECODER)
+#elif PLATFORM(QT)
         mutable QPixmap m_pixmap;
         mutable QImage m_image;
         bool m_hasAlpha;
index ad7a7b3..f0fbe44 100644 (file)
@@ -103,7 +103,7 @@ void init_source(j_decompress_ptr jd);
 boolean fill_input_buffer(j_decompress_ptr jd);
 void skip_input_data(j_decompress_ptr jd, long num_bytes);
 void term_source(j_decompress_ptr jd);
-void error_exit(j_common_ptr cinfo) NO_RETURN;
+void error_exit(j_common_ptr cinfo);
 
 // Implementation of a JPEG src object that understands our state machine
 struct decoder_source_mgr {
index 66514b4..c50ebe9 100644 (file)
@@ -64,7 +64,6 @@ const double cInverseGamma = 0.45455;
 const unsigned long cMaxPNGSize = 1000000UL;
 
 // Called if the decoding of the image fails.
-static void PNGAPI decodingFailed(png_structp png, png_const_charp) NO_RETURN;
 static void PNGAPI decodingFailed(png_structp png, png_const_charp)
 {
     longjmp(JMPBUF(png), 1);
index 273b09b..1ead9a9 100644 (file)
 
 #include "NotImplemented.h"
 
-namespace WebCore {
-
-#if !ENABLE(QT_IMAGE_DECODER)
-
-QPixmap* ImageFrame::asNewNativeImage() const
-{
-    QImage::Format fmt;
-    if (m_hasAlpha)
-        fmt = m_premultiplyAlpha ?  QImage::Format_ARGB32_Premultiplied : QImage::Format_ARGB32;
-    else
-        fmt = QImage::Format_RGB32;
+#include <QPixmap>
+#include <stdio.h>
 
-    QImage img(reinterpret_cast<uchar*>(m_bytes), m_size.width(), m_size.height(), sizeof(PixelData) * m_size.width(), fmt);
-
-    return new QPixmap(QPixmap::fromImage(img));
-}
-
-#else
+namespace WebCore {
 
 ImageFrame::ImageFrame()
     : m_hasAlpha(false) 
@@ -168,6 +154,4 @@ int ImageFrame::height() const
     return m_size.height();
 }
 
-#endif
-
 }
index 5d5348a..cb9ecac 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-23  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r108685.
+        http://trac.webkit.org/changeset/108685
+        https://bugs.webkit.org/show_bug.cgi?id=79414
+
+        Broke Chromium builds (Requested by enne on #webkit).
+
+        * qmake/mkspecs/features/features.prf:
+
 2012-02-23  Adam Barth  <abarth@webkit.org>
 
         style-queue shouldn't spam bugs if it fails to update its working copy
index a9b829c..ea731e4 100644 (file)
@@ -86,7 +86,6 @@ haveQt(4):unix:!mac:!embedded {
 !contains(DEFINES, ENABLE_VIDEO_TRACK=.): DEFINES += ENABLE_VIDEO_TRACK=0
 !contains(DEFINES, ENABLE_TOUCH_ICON_LOADING=.): DEFINES += ENABLE_TOUCH_ICON_LOADING=0
 !contains(DEFINES, ENABLE_ANIMATION_API=.): DEFINES += ENABLE_ANIMATION_API=0
-!contains(DEFINES, ENABLE_QT_IMAGE_DECODER=.): DEFINES += ENABLE_QT_IMAGE_DECODER=1
 
 # Enabled in Source/JavaScriptCore/wtf/Platform.h if not set
 # We have to do the same to be able to disable the feature in build-webkit