Bug 882526 - Remove Gecko support for WBMP. r=joe, r=roc
authorShih-Chiang Chien <schien@mozilla.com>
Mon, 22 Jul 2013 22:31:24 -0400
changeset 151819 d33324fd225144cc30aef26857e7d4ff03ce1776
parent 151818 2e6ca2dc655e4a92f455ae076a3870f282afd07d
child 151820 ab5069084abd33984e2e85aa39630ab02d23caa4
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoe, roc
bugs882526
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 882526 - Remove Gecko support for WBMP. r=joe, r=roc
b2g/confvars.sh
configure.in
image/build/nsImageModule.cpp
image/decoders/moz.build
image/decoders/nsWBMPDecoder.cpp
image/decoders/nsWBMPDecoder.h
image/src/Image.cpp
image/src/Image.h
image/src/RasterImage.cpp
image/src/imgRequest.cpp
image/test/reftest/reftest.list
image/test/reftest/wbmp/reftest.list
image/test/reftest/wbmp/wbmp-corrupted/err_fh_b0.wbmp
image/test/reftest/wbmp/wbmp-corrupted/err_fh_b1.wbmp
image/test/reftest/wbmp/wbmp-corrupted/err_fh_b2.wbmp
image/test/reftest/wbmp/wbmp-corrupted/err_fh_b3.wbmp
image/test/reftest/wbmp/wbmp-corrupted/err_fh_b4.wbmp
image/test/reftest/wbmp/wbmp-corrupted/err_fh_b7_and_ext_header.wbmp
image/test/reftest/wbmp/wbmp-corrupted/err_incomplete_height.wbmp
image/test/reftest/wbmp/wbmp-corrupted/err_incomplete_width.wbmp
image/test/reftest/wbmp/wbmp-corrupted/err_type_1.wbmp
image/test/reftest/wbmp/wbmp-corrupted/err_type_fix_only.wbmp
image/test/reftest/wbmp/wbmp-corrupted/err_type_fix_width_only.wbmp
image/test/reftest/wbmp/wbmp-corrupted/err_type_header_only.wbmp
image/test/reftest/wbmp/wbmp-corrupted/height_0.wbmp
image/test/reftest/wbmp/wbmp-corrupted/over_height.wbmp
image/test/reftest/wbmp/wbmp-corrupted/over_width.wbmp
image/test/reftest/wbmp/wbmp-corrupted/reftest.list
image/test/reftest/wbmp/wbmp-corrupted/width_0.wbmp
image/test/reftest/wbmp/wbmp-corrupted/width_0_height_0.wbmp
image/test/reftest/wbmp/wbmp-corrupted/wrapper.html
image/test/reftest/wbmp/wbmp-normal/bmts.png
image/test/reftest/wbmp/wbmp-normal/bmts.wbmp
image/test/reftest/wbmp/wbmp-normal/height_1.png
image/test/reftest/wbmp/wbmp-normal/height_1.wbmp
image/test/reftest/wbmp/wbmp-normal/large.png
image/test/reftest/wbmp/wbmp-normal/large.wbmp
image/test/reftest/wbmp/wbmp-normal/multi_byte_height.png
image/test/reftest/wbmp/wbmp-normal/multi_byte_height.wbmp
image/test/reftest/wbmp/wbmp-normal/multi_byte_width.png
image/test/reftest/wbmp/wbmp-normal/multi_byte_width.wbmp
image/test/reftest/wbmp/wbmp-normal/ok_fh_b5.png
image/test/reftest/wbmp/wbmp-normal/ok_fh_b5.wbmp
image/test/reftest/wbmp/wbmp-normal/ok_fh_b6.png
image/test/reftest/wbmp/wbmp-normal/ok_fh_b6.wbmp
image/test/reftest/wbmp/wbmp-normal/reftest.list
image/test/reftest/wbmp/wbmp-normal/width_1.png
image/test/reftest/wbmp/wbmp-normal/width_1.wbmp
image/test/reftest/wbmp/wbmp-normal/width_1_height_1.png
image/test/reftest/wbmp/wbmp-normal/width_1_height_1.wbmp
netwerk/mime/nsMimeTypes.h
uriloader/exthandler/nsExternalHelperAppService.cpp
--- a/b2g/confvars.sh
+++ b/b2g/confvars.sh
@@ -50,9 +50,8 @@ MOZ_EXTENSION_MANAGER=1
 MOZ_TIME_MANAGER=1
 
 MOZ_B2G_CERTDATA=1
 MOZ_PAY=1
 MOZ_TOOLKIT_SEARCH=
 MOZ_PLACES=
 MOZ_B2G=1
 MOZ_FOLD_LIBS=1
-MOZ_WBMP=1
--- a/configure.in
+++ b/configure.in
@@ -8600,22 +8600,16 @@ if test -n "$MOZ_SERVICES_SYNC"; then
 fi
 
 dnl Build Captive Portal Detector if required
 AC_SUBST(MOZ_CAPTIVEDETECT)
 if test -n "$MOZ_CAPTIVEDETECT"; then
   AC_DEFINE(MOZ_CAPTIVEDETECT)
 fi
 
-dnl Build WBMP decoder if required
-AC_SUBST(MOZ_WBMP)
-if test -n "$MOZ_WBMP"; then
-  AC_DEFINE(MOZ_WBMP)
-fi
-
 dnl ========================================================
 if test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC" -o "$MOZ_DMD"; then
     MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
 fi
 
 if test "$MOZ_APP_COMPONENT_INCLUDE"; then
   AC_DEFINE_UNQUOTED(MOZ_APP_COMPONENT_INCLUDE, "$MOZ_APP_COMPONENT_INCLUDE")
 fi
--- a/image/build/nsImageModule.cpp
+++ b/image/build/nsImageModule.cpp
@@ -68,19 +68,16 @@ static const mozilla::Module::CategoryEn
   { "Gecko-Content-Viewers", IMAGE_JPG, "@mozilla.org/content/document-loader-factory;1" },
   { "Gecko-Content-Viewers", IMAGE_ICO, "@mozilla.org/content/document-loader-factory;1" },
   { "Gecko-Content-Viewers", IMAGE_ICO_MS, "@mozilla.org/content/document-loader-factory;1" },
   { "Gecko-Content-Viewers", IMAGE_BMP, "@mozilla.org/content/document-loader-factory;1" },
   { "Gecko-Content-Viewers", IMAGE_BMP_MS, "@mozilla.org/content/document-loader-factory;1" },
   { "Gecko-Content-Viewers", IMAGE_ICON_MS, "@mozilla.org/content/document-loader-factory;1" },
   { "Gecko-Content-Viewers", IMAGE_PNG, "@mozilla.org/content/document-loader-factory;1" },
   { "Gecko-Content-Viewers", IMAGE_X_PNG, "@mozilla.org/content/document-loader-factory;1" },
-#ifdef MOZ_WBMP
-  { "Gecko-Content-Viewers", IMAGE_WBMP, "@mozilla.org/content/document-loader-factory;1" },
-#endif
   { "content-sniffing-services", "@mozilla.org/image/loader;1", "@mozilla.org/image/loader;1" },
   { NULL }
 };
 
 static nsresult
 imglib_Initialize()
 {
   mozilla::image::DiscardTracker::Initialize();
--- a/image/decoders/moz.build
+++ b/image/decoders/moz.build
@@ -29,15 +29,10 @@ CPP_SOURCES += [
     'nsBMPDecoder.cpp',
     'nsGIFDecoder2.cpp',
     'nsICODecoder.cpp',
     'nsIconDecoder.cpp',
     'nsJPEGDecoder.cpp',
     'nsPNGDecoder.cpp',
 ]
 
-if CONFIG['MOZ_WBMP']:
-    CPP_SOURCES += [
-        'nsWBMPDecoder.cpp',
-    ]
-
 LIBRARY_NAME = 'imgdecoders_s'
 
deleted file mode 100644
--- a/image/decoders/nsWBMPDecoder.cpp
+++ /dev/null
@@ -1,279 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsWBMPDecoder.h"
-#include "RasterImage.h"
-#include "nspr.h"
-#include "nsRect.h"
-#include "gfxPlatform.h"
-
-#include "nsError.h"
-
-namespace mozilla {
-namespace image {
-
-static inline void SetPixel(uint32_t*& aDecoded, bool aPixelWhite)
-{
-  uint8_t pixelValue = aPixelWhite ? 255 : 0;
-
-  *aDecoded++ = gfxPackedPixel(0xFF, pixelValue, pixelValue, pixelValue);
-}
-
-/** Parses a WBMP encoded int field.  Returns IntParseInProgress (out of
- *  data), IntParseSucceeded if the field was read OK or IntParseFailed
- *  on an error.
- *  The encoding used for WBMP ints is per byte.  The high bit is a
- *  continuation flag saying (when set) that the next byte is part of the
- *  field, and the low seven bits are data.  New data bits are added in the
- *  low bit positions, i.e. the field is big-endian (ignoring the high bits).
- * @param aField Variable holds current value of field.  When this function
- *               returns IntParseInProgress, aField will hold the
- *               intermediate result of the decoding, so this function can be
- *               called repeatedly for new bytes on the same field and will
- *               operate correctly.
- * @param aBuffer Points to encoded field data.
- * @param aCount Number of bytes in aBuffer. */
-static WbmpIntDecodeStatus DecodeEncodedInt (uint32_t& aField, const char*& aBuffer, uint32_t& aCount)
-{
-  while (aCount > 0) {
-    // Check if the result would overflow if another seven bits were added.
-    // The actual test performed is AND to check if any of the top seven bits are set.
-    if (aField & 0xFE000000) {
-      // Overflow :(
-      return IntParseFailed;
-    }
-
-    // Get next encoded byte.
-    char encodedByte = *aBuffer;
-
-    // Update buffer state variables now we have read this byte.
-    aBuffer++;
-    aCount--;
-
-    // Work out and store the new (valid) value of the encoded int with this byte added.
-    aField = (aField << 7) + (uint32_t)(encodedByte & 0x7F);
-
-    if (!(encodedByte & 0x80)) {
-      // No more bytes, value is complete.
-      return IntParseSucceeded;
-    }
-  }
-
-  // Out of data but in the middle of an encoded int.
-  return IntParseInProgress;
-}
-
-nsWBMPDecoder::nsWBMPDecoder(RasterImage &aImage)
- : Decoder(aImage),
-   mWidth(0),
-   mHeight(0),
-   mRow(nullptr),
-   mRowBytes(0),
-   mCurLine(0),
-   mState(WbmpStateStart)
-{
-  // Nothing to do
-}
-
-nsWBMPDecoder::~nsWBMPDecoder()
-{
-  moz_free(mRow);
-}
-
-void
-nsWBMPDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
-{
-  NS_ABORT_IF_FALSE(!HasError(), "Shouldn't call WriteInternal after error!");
-
-  // Loop until the input data is gone
-  while (aCount > 0) {
-    switch (mState) {
-      case WbmpStateStart:
-      {
-        // Since we only accept a type 0 WBMP we can just check the first byte is 0.
-        // (The specification says a well defined type 0 bitmap will start with a 0x00 byte).
-        if (*aBuffer++ == 0x00) {
-          // This is a type 0 WBMP.
-          aCount--;
-          mState = DecodingFixHeader;
-        } else {
-          // This is a new type of WBMP or a type 0 WBMP defined oddly (e.g. 0x80 0x00)
-          PostDataError();
-          mState = DecodingFailed;
-          return;
-        }
-        break;
-      }
-
-      case DecodingFixHeader:
-      {
-        if ((*aBuffer++ & 0x9F) == 0x00) {
-          // Fix header field is as expected
-          aCount--;
-          // For now, we skip the ext header field as it is not in a well-defined type 0 WBMP.
-          mState = DecodingWidth;
-        } else {
-          // Can't handle this fix header field.
-          PostDataError();
-          mState = DecodingFailed;
-          return;
-        }
-        break;
-      }
-
-      case DecodingWidth:
-      {
-        WbmpIntDecodeStatus widthReadResult = DecodeEncodedInt (mWidth, aBuffer, aCount);
-
-        if (widthReadResult == IntParseSucceeded) {
-          mState = DecodingHeight;
-        } else if (widthReadResult == IntParseFailed) {
-          // Encoded width was bigger than a uint32_t or equal to 0.
-          PostDataError();
-          mState = DecodingFailed;
-          return;
-        } else {
-          // We are still parsing the encoded int field.
-          NS_ABORT_IF_FALSE((widthReadResult == IntParseInProgress),
-                            "nsWBMPDecoder got bad result from an encoded width field");
-          return;
-        }
-        break;
-      }
-
-      case DecodingHeight:
-      {
-        WbmpIntDecodeStatus heightReadResult = DecodeEncodedInt (mHeight, aBuffer, aCount);
-
-        if (heightReadResult == IntParseSucceeded) {
-          // The header has now been entirely read.
-          const uint32_t k64KWidth = 0x0000FFFF;
-          if (mWidth == 0 || mWidth > k64KWidth
-              || mHeight == 0 || mHeight > k64KWidth) {
-            // consider 0 as an incorrect image size
-            // reject the extremely wide/high images to keep the math sane
-            PostDataError();
-            mState = DecodingFailed;
-            return;
-          }
-
-          // Post our size to the superclass
-          PostSize(mWidth, mHeight);
-          if (HasError()) {
-            // Setting the size led to an error.
-            mState = DecodingFailed;
-            return;
-          }
-
-          // If We're doing a size decode, we're done
-          if (IsSizeDecode()) {
-            mState = WbmpStateFinished;
-            return;
-          }
-
-          if (!mImageData) {
-            PostDecoderError(NS_ERROR_FAILURE);
-            mState = DecodingFailed;
-            return;
-          }
-
-          // Create mRow, the buffer that holds one line of the raw image data
-          mRow = (uint8_t*)moz_malloc((mWidth + 7) / 8);
-          if (!mRow) {
-            PostDecoderError(NS_ERROR_OUT_OF_MEMORY);
-            mState = DecodingFailed;
-            return;
-          }
-
-          mState = DecodingImageData;
-
-        } else if (heightReadResult == IntParseFailed) {
-          // Encoded height was bigger than a uint32_t.
-          PostDataError();
-          mState = DecodingFailed;
-          return;
-        } else {
-          // We are still parsing the encoded int field.
-          NS_ABORT_IF_FALSE((heightReadResult == IntParseInProgress),
-                            "nsWBMPDecoder got bad result from an encoded height field");
-          return;
-        }
-        break;
-      }
-
-      case DecodingImageData:
-      {
-        uint32_t rowSize = (mWidth + 7) / 8; // +7 to round up to nearest byte
-        uint32_t top = mCurLine;
-
-        // Process up to one row of data at a time until there is no more data.
-        while ((aCount > 0) && (mCurLine < mHeight)) {
-          // Calculate if we need to copy data to fill the next buffered row of raw data.
-          uint32_t toCopy = rowSize - mRowBytes;
-
-          // If required, copy raw data to fill a buffered row of raw data.
-          if (toCopy) {
-            if (toCopy > aCount)
-              toCopy = aCount;
-            memcpy(mRow + mRowBytes, aBuffer, toCopy);
-            aCount -= toCopy;
-            aBuffer += toCopy;
-            mRowBytes += toCopy;
-          }
-
-          // If there is a filled buffered row of raw data, process the row.
-          if (rowSize == mRowBytes) {
-            uint8_t *p = mRow;
-            uint32_t *d = reinterpret_cast<uint32_t*>(mImageData) + (mWidth * mCurLine); // position of the first pixel at mCurLine
-            uint32_t lpos = 0;
-
-            while (lpos < mWidth) {
-              for (int8_t bit = 7; bit >= 0; bit--) {
-                if (lpos >= mWidth)
-                  break;
-                bool pixelWhite = (*p >> bit) & 1;
-                SetPixel(d, pixelWhite);
-                ++lpos;
-              }
-              ++p;
-            }
-
-            mCurLine++;
-            mRowBytes = 0;
-          }
-        }
-
-        nsIntRect r(0, top, mWidth, mCurLine - top);
-        // Invalidate
-        PostInvalidation(r);
-
-        // If we've got all the pixel bytes, we're finished
-        if (mCurLine == mHeight) {
-          PostFrameStop();
-          PostDecodeDone();
-          mState = WbmpStateFinished;
-        }
-        break;
-      }
-
-      case WbmpStateFinished:
-      {
-        // Consume all excess data silently
-        aCount = 0;
-        break;
-      }
-
-      case DecodingFailed:
-      {
-        NS_ABORT_IF_FALSE(0, "Shouldn't process any data after decode failed!");
-        return;
-      }
-    }
-  }
-}
-
-} // namespace image
-} // namespace mozilla
deleted file mode 100644
--- a/image/decoders/nsWBMPDecoder.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef nsWBMPDecoder_h__
-#define nsWBMPDecoder_h__
-
-#include "Decoder.h"
-#include "nsCOMPtr.h"
-#include "imgDecoderObserver.h"
-#include "gfxColor.h"
-
-namespace mozilla {
-namespace image {
-class RasterImage;
-
-/* WBMP is a monochrome graphics file format optimized for mobile computing devices.
- * Format description from http://www.wapforum.org/what/technical/SPEC-WAESpec-19990524.pdf
- */
-
-typedef enum {
-  WbmpStateStart,
-  DecodingFixHeader,
-  DecodingWidth,
-  DecodingHeight,
-  DecodingImageData,
-  DecodingFailed,
-  WbmpStateFinished
-} WbmpDecodingState;
-
-typedef enum {
-  IntParseSucceeded,
-  IntParseFailed,
-  IntParseInProgress
-} WbmpIntDecodeStatus;
-
-class nsWBMPDecoder : public Decoder
-{
-public:
-
-  nsWBMPDecoder(RasterImage &aImage);
-  virtual ~nsWBMPDecoder();
-
-  virtual void WriteInternal(const char* aBuffer, uint32_t aCount);
-
-private:
-  uint32_t mWidth;
-  uint32_t mHeight;
-
-  uint8_t* mRow;                    // Holds one raw line of the image
-  uint32_t mRowBytes;               // How many bytes of the row were already received
-  uint32_t mCurLine;                // The current line being decoded (0 to mHeight - 1)
-
-  WbmpDecodingState mState;         // Describes what part of the file we are decoding now.
-};
-
-} // namespace image
-} // namespace mozilla
-
-#endif // nsWBMPDecoder_h__
--- a/image/src/Image.cpp
+++ b/image/src/Image.cpp
@@ -81,22 +81,16 @@ Image::GetDecoderType(const char *aMimeT
     rv = eDecoderType_ico;
   else if (!strcmp(aMimeType, IMAGE_ICO_MS))
     rv = eDecoderType_ico;
 
   // Icon
   else if (!strcmp(aMimeType, IMAGE_ICON_MS))
     rv = eDecoderType_icon;
 
-#ifdef MOZ_WBMP
-  // WBMP
-  else if (!strcmp(aMimeType, IMAGE_WBMP))
-    rv = eDecoderType_wbmp;
-#endif
-
   return rv;
 }
 
 void
 ImageResource::IncrementAnimationConsumers()
 {
   mAnimationConsumers++;
 }
--- a/image/src/Image.h
+++ b/image/src/Image.h
@@ -22,18 +22,17 @@ public:
   // Mimetype translation
   enum eDecoderType {
     eDecoderType_png     = 0,
     eDecoderType_gif     = 1,
     eDecoderType_jpeg    = 2,
     eDecoderType_bmp     = 3,
     eDecoderType_ico     = 4,
     eDecoderType_icon    = 5,
-    eDecoderType_wbmp    = 6,
-    eDecoderType_unknown = 7
+    eDecoderType_unknown = 6
   };
   static eDecoderType GetDecoderType(const char *aMimeType);
 
   /**
    * Flags for Image initialization.
    *
    * Meanings:
    *
--- a/image/src/RasterImage.cpp
+++ b/image/src/RasterImage.cpp
@@ -28,20 +28,16 @@
 
 #include "nsPNGDecoder.h"
 #include "nsGIFDecoder2.h"
 #include "nsJPEGDecoder.h"
 #include "nsBMPDecoder.h"
 #include "nsICODecoder.h"
 #include "nsIconDecoder.h"
 
-#ifdef MOZ_WBMP
-#include "nsWBMPDecoder.h"
-#endif
-
 #include "gfxContext.h"
 
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Services.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/StandardInteger.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/TimeStamp.h"
@@ -1992,21 +1988,16 @@ RasterImage::InitDecoder(bool aDoSizeDec
       mDecoder = new nsBMPDecoder(*this);
       break;
     case eDecoderType_ico:
       mDecoder = new nsICODecoder(*this);
       break;
     case eDecoderType_icon:
       mDecoder = new nsIconDecoder(*this);
       break;
-#ifdef MOZ_WBMP
-    case eDecoderType_wbmp:
-      mDecoder = new nsWBMPDecoder(*this);
-      break;
-#endif
     default:
       NS_ABORT_IF_FALSE(0, "Shouldn't get here!");
   }
 
   // If we already have frames, we're probably in the multipart/x-mixed-replace
   // case. Regardless, we need to lock the last frame. Our invariant is that,
   // while we have a decoder open, the last frame is always locked.
   if (GetNumFrames() > 0) {
--- a/image/src/imgRequest.cpp
+++ b/image/src/imgRequest.cpp
@@ -701,27 +701,16 @@ imgRequest::OnDataAvailable(nsIRequest *
         this->Cancel(NS_IMAGELIB_ERROR_FAILURE);
 
         return NS_BINDING_ABORTED;
       }
 
       LOG_MSG(GetImgLog(), "imgRequest::OnDataAvailable", "Got content type from the channel");
     }
 
-#ifdef MOZ_WBMP
-#ifdef MOZ_WIDGET_GONK
-    // Only support WBMP in privileged app and certified app, do not support in browser app.
-    if (newType.EqualsLiteral(IMAGE_WBMP) &&
-        (!mLoadingPrincipal || mLoadingPrincipal->GetAppStatus() < nsIPrincipal::APP_STATUS_PRIVILEGED)) {
-      this->Cancel(NS_ERROR_FAILURE);
-      return NS_BINDING_ABORTED;
-    }
-#endif
-#endif
-
     // If we're a regular image and this is the first call to OnDataAvailable,
     // this will always be true. If we've resniffed our MIME type (i.e. we're a
     // multipart/x-mixed-replace image), we have to be able to switch our image
     // type and decoder.
     // We always reinitialize for SVGs, because they have no way of
     // reinitializing themselves.
     if (mContentType != newType || newType.EqualsLiteral(IMAGE_SVG_XML)) {
       mContentType = newType;
--- a/image/test/reftest/reftest.list
+++ b/image/test/reftest/reftest.list
@@ -41,13 +41,10 @@ include icon/win/reftest.list
 include generic/reftest.list
 
 # Color management test
 include color-management/reftest.list
 
 # Lossless encoders
 skip-if(Android||B2G) include encoders-lossless/reftest.list # bug 783621
 
-# WBMP tests
-#skip-if(!B2G) include wbmp/reftest.list # bug 852053
-
 # Animated image disposal and blending operator tests
 include animated/reftest.list
deleted file mode 100644
--- a/image/test/reftest/wbmp/reftest.list
+++ /dev/null
@@ -1,4 +0,0 @@
-# WBMP tests
-
-include wbmp-normal/reftest.list
-include wbmp-corrupted/reftest.list
deleted file mode 100644
index 02bab5161e7b1a275af72c19edabf4bb98dd8088..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 2a5f1e3fe7990c4e177a617a350fb13af77c0dac..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c6b25c73101e363edcbd68d0b63a227e62123ea0..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 07496ae12bcedf294a9147f2ebeb7a230ec8bd27..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 1dc131c5eed95f8a5d57d43d452f40ba2d094526..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 740c4e609e54359f47be08911ef8ddf2987e4497..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 4bb14c6fde092a1966564ef6bf385153b335c186..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index a3dc365f669833f6d78017e0f88586a98cee91a1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 3cc022aeabc38c6c0cf37960f9b6f6117e1acca9..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 09f370e38f498a462e1ca0faa724559b6630c04f..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 2ac3db9b149b9bf3a11b7806d148ca46d6f6c277..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index f76dd238ade08917e6712764a16a22005a50573d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index d0864865710b1139b417d7f6b0b39530cf7a3914..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 215ae92661d576cd95a350e8bce4e468e27ebb41..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 3aad46a6c0b58092c83c66deaf717e43f4f203d6..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/image/test/reftest/wbmp/wbmp-corrupted/reftest.list
+++ /dev/null
@@ -1,25 +0,0 @@
-# Corrupted WBMP tests
-
-# Tests for corrupted header value
-== wrapper.html?err_fh_b0.wbmp about:blank
-== wrapper.html?err_fh_b1.wbmp about:blank
-== wrapper.html?err_fh_b2.wbmp about:blank
-== wrapper.html?err_fh_b3.wbmp about:blank
-== wrapper.html?err_fh_b4.wbmp about:blank
-== wrapper.html?err_fh_b5.wbmp about:blank
-== wrapper.html?err_fh_b6.wbmp about:blank
-== wrapper.html?err_fh_b7_and_ext_header.wbmp about:blank
-# Tests for corrupted size value
-== wrapper.html?err_incomplete_height.wbmp about:blank
-== wrapper.html?err_incomplete_width.wbmp about:blank
-== wrapper.html?over_height.wbmp about:blank
-== wrapper.html?over_width.wbmp about:blank
-# Tests for unsupported type value
-== wrapper.html?err_type_1.wbmp about:blank
-== wrapper.html?err_type_fix_only.wbmp about:blank
-== wrapper.html?err_type_fix_width_only.wbmp about:blank
-== wrapper.html?err_type_header_only.wbmp about:blank
-# Test for empty size value
-== wrapper.html?height_0.wbmp about:blank
-== wrapper.html?width_0.wbmp about:blank
-== wrapper.html?width_0_height_0.wbmp about:blank
deleted file mode 100644
index 823d95f61618f8f79814721bb50f3dddd46a5ac3..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c6e1db2b424f85bfc1029def06429d1048077217..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/image/test/reftest/wbmp/wbmp-corrupted/wrapper.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML>
-<html class="reftest-wait">
-<head>
-<title>Image reftest wrapper</title>
-<style type="text/css">
-  #image1 { background-color: rgb(10, 100, 250); }
-</style>
-<script>
-  // The image is loaded async after the page loads
-  // wait for it to finish loading
-  function onImageLoad() {
-    document.documentElement.removeAttribute("class");
-  };
-</script>
-</head>
-<body>
-<img id="image1">
-<script>
-  // Use as "wrapper.html?image.png"
-  var imgURL = document.location.search.substr(1);
-  document.images[0].onload = onImageLoad;
-  document.images[0].onerror = onImageLoad;
-  document.images[0].src = imgURL;
-</script>
-</body>
-</html>
-
deleted file mode 100644
index 451dd0af3af7801e24520c9fd3ab1ae558ac6598..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 48535859ed1fc5d185e4d7967656bfda53fb7d9a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 112a6370e77d0bd2cf3f91f72f0d7fbbd7d44c73..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 08e8911afccd87c5a0803513cfeef0e00dabe4ac..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 7ae6ac5cd0d17ca77a9e580e2da0900d0081d3b0..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 4ae113a29b79966b630f7c331de0d72256f2635a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 405e9824dc8e4725ada5ca6adcbb64cb91dc8cfa..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c652719e94f25da7617be105fe340ee706333503..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index ae5090be55a4855ae289b858305671012b4583f1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index d694fa3d2912d88e444eeb9ea65c3d9a13fdab23..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 451dd0af3af7801e24520c9fd3ab1ae558ac6598..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 62b6cea69034a7bcdb6278d54d979ab4871aa7b3..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 451dd0af3af7801e24520c9fd3ab1ae558ac6598..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 550b847b8cd79329c83600dd4f437558f1497254..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/image/test/reftest/wbmp/wbmp-normal/reftest.list
+++ /dev/null
@@ -1,11 +0,0 @@
-# WBMP tests
-
-== bmts.wbmp bmts.png
-== ok_fh_b5.wbmp ok_fh_b5.png
-== ok_fh_b6.wbmp ok_fh_b6.png
-== height_1.wbmp height_1.png
-== width_1.wbmp width_1.png
-== width_1_height_1.wbmp width_1_height_1.png
-== multi_byte_height.wbmp multi_byte_height.png
-== multi_byte_width.wbmp multi_byte_width.png
-== large.wbmp large.png
deleted file mode 100644
index 74ba139392521bc42db4fd7b220478bd80306736..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index e38cbf8dbd3573ee309b5ba22c27d1378998cf1d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 631b795a2548627300473c822a2d1063841b2193..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index f6a6184dcca81f14c1fb4b6536c434857283a9d5..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/netwerk/mime/nsMimeTypes.h
+++ b/netwerk/mime/nsMimeTypes.h
@@ -97,17 +97,16 @@
 #define IMAGE_BMP                           "image/bmp"
 #define IMAGE_BMP_MS                        "image/x-ms-bmp"
 #define IMAGE_ICO                           "image/x-icon"
 #define IMAGE_ICO_MS                        "image/vnd.microsoft.icon"
 #define IMAGE_ICON_MS                       "image/icon"
 #define IMAGE_MNG                           "video/x-mng"
 #define IMAGE_JNG                           "image/x-jng"
 #define IMAGE_SVG_XML                       "image/svg+xml"
-#define IMAGE_WBMP                          "image/vnd.wap.wbmp"
 
 #define MESSAGE_EXTERNAL_BODY               "message/external-body"
 #define MESSAGE_NEWS                        "message/news"
 #define MESSAGE_RFC822                      "message/rfc822"
 
 #define MULTIPART_ALTERNATIVE               "multipart/alternative"
 #define MULTIPART_APPLEDOUBLE               "multipart/appledouble"
 #define MULTIPART_DIGEST                    "multipart/digest"
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -475,19 +475,16 @@ static nsExtraMimeTypeEntry extraMimeEnt
   { IMAGE_ART, "art", "ART Image" },
   { IMAGE_BMP, "bmp", "BMP Image" },
   { IMAGE_GIF, "gif", "GIF Image" },
   { IMAGE_ICO, "ico,cur", "ICO Image" },
   { IMAGE_JPEG, "jpeg,jpg,jfif,pjpeg,pjp", "JPEG Image" },
   { IMAGE_PNG, "png", "PNG Image" },
   { IMAGE_TIFF, "tiff,tif", "TIFF Image" },
   { IMAGE_XBM, "xbm", "XBM Image" },
-#ifdef MOZ_WBMP
-  { IMAGE_WBMP, "wbmp", "WBMP Image" },
-#endif
   { "image/svg+xml", "svg", "Scalable Vector Graphics" },
   { MESSAGE_RFC822, "eml", "RFC-822 data" },
   { TEXT_PLAIN, "txt,text", "Text File" },
   { TEXT_HTML, "html,htm,shtml,ehtml", "HyperText Markup Language" },
   { "application/xhtml+xml", "xhtml,xht", "Extensible HyperText Markup Language" },
   { APPLICATION_MATHML_XML, "mml", "Mathematical Markup Language" },
   { APPLICATION_RDF, "rdf", "Resource Description Framework" },
   { TEXT_XUL, "xul", "XML-Based User Interface Language" },