From d8f9d47626cfa2679ec44fabb8eabeb77d1c8a52 Mon Sep 17 00:00:00 2001 From: Seth Fowler Date: Wed, 19 Dec 2012 13:33:56 -0800 Subject: [PATCH] Bug 822846 - Use nsMimeTypes.h instead of working with literal strings in imagelib. r=joe --- image/build/nsImageModule.cpp | 31 ++++++++++--------- image/decoders/icon/android/nsIconChannel.cpp | 3 +- image/decoders/icon/gtk/nsIconChannel.cpp | 3 +- image/decoders/icon/mac/nsIconChannelCocoa.mm | 4 +-- image/decoders/icon/os2/nsIconChannel.cpp | 3 +- image/decoders/icon/qt/nsIconChannel.cpp | 3 +- image/decoders/icon/win/nsIconChannel.cpp | 2 +- image/src/Image.cpp | 24 +++++++------- image/src/ImageFactory.cpp | 5 ++- image/src/ImageFactory.h | 2 -- image/src/SVGDocumentWrapper.cpp | 4 +-- image/src/SVGDocumentWrapper.h | 2 +- image/src/VectorImage.cpp | 3 +- image/src/imgLoader.cpp | 15 ++++----- image/src/imgRequest.cpp | 3 +- netwerk/mime/nsMimeTypes.h | 10 ++++-- .../exthandler/nsExternalHelperAppService.cpp | 6 ++-- 17 files changed, 68 insertions(+), 55 deletions(-) diff --git a/image/build/nsImageModule.cpp b/image/build/nsImageModule.cpp index b6a35cfe099..cd2ebd5fab1 100644 --- a/image/build/nsImageModule.cpp +++ b/image/build/nsImageModule.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/ModuleUtils.h" +#include "nsMimeTypes.h" #include "RasterImage.h" @@ -61,25 +62,25 @@ static const mozilla::Module::ContractIDEntry kImageContracts[] = { { "@mozilla.org/image/loader;1", &kNS_IMGLOADER_CID }, { "@mozilla.org/image/request;1", &kNS_IMGREQUESTPROXY_CID }, { "@mozilla.org/image/tools;1", &kNS_IMGTOOLS_CID }, - { "@mozilla.org/image/encoder;2?type=image/vnd.microsoft.icon", &kNS_ICOENCODER_CID }, - { "@mozilla.org/image/encoder;2?type=image/jpeg", &kNS_JPEGENCODER_CID }, - { "@mozilla.org/image/encoder;2?type=image/png", &kNS_PNGENCODER_CID }, - { "@mozilla.org/image/encoder;2?type=image/bmp", &kNS_BMPENCODER_CID }, + { "@mozilla.org/image/encoder;2?type=" IMAGE_ICO_MS, &kNS_ICOENCODER_CID }, + { "@mozilla.org/image/encoder;2?type=" IMAGE_JPEG, &kNS_JPEGENCODER_CID }, + { "@mozilla.org/image/encoder;2?type=" IMAGE_PNG, &kNS_PNGENCODER_CID }, + { "@mozilla.org/image/encoder;2?type=" IMAGE_BMP, &kNS_BMPENCODER_CID }, { NULL } }; static const mozilla::Module::CategoryEntry kImageCategories[] = { - { "Gecko-Content-Viewers", "image/gif", "@mozilla.org/content/document-loader-factory;1" }, - { "Gecko-Content-Viewers", "image/jpeg", "@mozilla.org/content/document-loader-factory;1" }, - { "Gecko-Content-Viewers", "image/pjpeg", "@mozilla.org/content/document-loader-factory;1" }, - { "Gecko-Content-Viewers", "image/jpg", "@mozilla.org/content/document-loader-factory;1" }, - { "Gecko-Content-Viewers", "image/x-icon", "@mozilla.org/content/document-loader-factory;1" }, - { "Gecko-Content-Viewers", "image/vnd.microsoft.icon", "@mozilla.org/content/document-loader-factory;1" }, - { "Gecko-Content-Viewers", "image/bmp", "@mozilla.org/content/document-loader-factory;1" }, - { "Gecko-Content-Viewers", "image/x-ms-bmp", "@mozilla.org/content/document-loader-factory;1" }, - { "Gecko-Content-Viewers", "image/icon", "@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" }, + { "Gecko-Content-Viewers", IMAGE_GIF, "@mozilla.org/content/document-loader-factory;1" }, + { "Gecko-Content-Viewers", IMAGE_JPEG, "@mozilla.org/content/document-loader-factory;1" }, + { "Gecko-Content-Viewers", IMAGE_PJPEG, "@mozilla.org/content/document-loader-factory;1" }, + { "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, "@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" }, { "content-sniffing-services", "@mozilla.org/image/loader;1", "@mozilla.org/image/loader;1" }, { NULL } }; diff --git a/image/decoders/icon/android/nsIconChannel.cpp b/image/decoders/icon/android/nsIconChannel.cpp index e269d379c30..11af0f3061c 100644 --- a/image/decoders/icon/android/nsIconChannel.cpp +++ b/image/decoders/icon/android/nsIconChannel.cpp @@ -5,6 +5,7 @@ #include #include "mozilla/dom/ContentChild.h" +#include "nsMimeTypes.h" #include "nsIURL.h" #include "nsXULAppAPI.h" #include "AndroidBridge.h" @@ -102,7 +103,7 @@ moz_icon_to_channel(nsIURI *aURI, const nsACString& aFileExt, uint32_t aIconSize NS_ENSURE_SUCCESS(rv, rv); return NS_NewInputStreamChannel(aChannel, aURI, stream, - NS_LITERAL_CSTRING("image/icon")); + NS_LITERAL_CSTRING(IMAGE_ICON)); } nsresult diff --git a/image/decoders/icon/gtk/nsIconChannel.cpp b/image/decoders/icon/gtk/nsIconChannel.cpp index 32e73191f10..a52aa261d3b 100644 --- a/image/decoders/icon/gtk/nsIconChannel.cpp +++ b/image/decoders/icon/gtk/nsIconChannel.cpp @@ -25,6 +25,7 @@ extern "C" { #include +#include "nsMimeTypes.h" #include "nsIMIMEService.h" #include "nsIStringBundle.h" @@ -125,7 +126,7 @@ moz_gdk_pixbuf_to_channel(GdkPixbuf* aPixbuf, nsIURI *aURI, NS_ENSURE_SUCCESS(rv, rv); rv = NS_NewInputStreamChannel(aChannel, aURI, stream, - NS_LITERAL_CSTRING("image/icon")); + NS_LITERAL_CSTRING(IMAGE_ICON)); return rv; } diff --git a/image/decoders/icon/mac/nsIconChannelCocoa.mm b/image/decoders/icon/mac/nsIconChannelCocoa.mm index d53177b0fb0..d1fff37cfab 100644 --- a/image/decoders/icon/mac/nsIconChannelCocoa.mm +++ b/image/decoders/icon/mac/nsIconChannelCocoa.mm @@ -345,7 +345,7 @@ NS_IMETHODIMP nsIconChannel::SetLoadFlags(uint32_t aLoadAttributes) NS_IMETHODIMP nsIconChannel::GetContentType(nsACString &aContentType) { - aContentType.AssignLiteral("image/icon"); + aContentType.AssignLiteral(IMAGE_ICON); return NS_OK; } @@ -359,7 +359,7 @@ nsIconChannel::SetContentType(const nsACString &aContentType) NS_IMETHODIMP nsIconChannel::GetContentCharset(nsACString &aContentCharset) { - aContentCharset.AssignLiteral("image/icon"); + aContentCharset.AssignLiteral(IMAGE_ICON); return NS_OK; } diff --git a/image/decoders/icon/os2/nsIconChannel.cpp b/image/decoders/icon/os2/nsIconChannel.cpp index 1906efc949a..bdcf14d1b5c 100644 --- a/image/decoders/icon/os2/nsIconChannel.cpp +++ b/image/decoders/icon/os2/nsIconChannel.cpp @@ -11,6 +11,7 @@ #include "nsReadableUtils.h" #include "nsMemory.h" #include "nsNetUtil.h" +#include "nsMimeTypes.h" #include "nsIFile.h" #include "nsIFileURL.h" #include "nsDirectoryServiceDefs.h" @@ -573,7 +574,7 @@ void ConvertMaskBitMap(uint8_t *inBuf, PBITMAPINFO2 pBMInfo, NS_IMETHODIMP nsIconChannel::GetContentType(nsACString &aContentType) { - aContentType.AssignLiteral("image/icon"); + aContentType.AssignLiteral(IMAGE_ICON); return NS_OK; } diff --git a/image/decoders/icon/qt/nsIconChannel.cpp b/image/decoders/icon/qt/nsIconChannel.cpp index d8233bd3fcb..5629ffd4d62 100644 --- a/image/decoders/icon/qt/nsIconChannel.cpp +++ b/image/decoders/icon/qt/nsIconChannel.cpp @@ -10,6 +10,7 @@ #include #include +#include "nsMimeTypes.h" #include "nsIMIMEService.h" #include "nsIStringBundle.h" @@ -84,7 +85,7 @@ moz_qicon_to_channel(QImage *image, nsIURI *aURI, NS_ENSURE_SUCCESS(rv, rv); return NS_NewInputStreamChannel(aChannel, aURI, stream, - NS_LITERAL_CSTRING("image/icon")); + NS_LITERAL_CSTRING(IMAGE_ICON)); } nsresult diff --git a/image/decoders/icon/win/nsIconChannel.cpp b/image/decoders/icon/win/nsIconChannel.cpp index f2c2156238b..63b0b5c1123 100644 --- a/image/decoders/icon/win/nsIconChannel.cpp +++ b/image/decoders/icon/win/nsIconChannel.cpp @@ -587,7 +587,7 @@ nsresult nsIconChannel::MakeInputStream(nsIInputStream** _retval, bool nonBlocki NS_IMETHODIMP nsIconChannel::GetContentType(nsACString &aContentType) { - aContentType.AssignLiteral("image/x-icon"); + aContentType.AssignLiteral(IMAGE_ICO); return NS_OK; } diff --git a/image/src/Image.cpp b/image/src/Image.cpp index b3532c336ea..096088cbeb8 100644 --- a/image/src/Image.cpp +++ b/image/src/Image.cpp @@ -3,6 +3,8 @@ * 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 "nsMimeTypes.h" + #include "Image.h" namespace mozilla { @@ -49,39 +51,39 @@ Image::GetDecoderType(const char *aMimeType) eDecoderType rv = eDecoderType_unknown; // PNG - if (!strcmp(aMimeType, "image/png")) + if (!strcmp(aMimeType, IMAGE_PNG)) rv = eDecoderType_png; - else if (!strcmp(aMimeType, "image/x-png")) + else if (!strcmp(aMimeType, IMAGE_X_PNG)) rv = eDecoderType_png; // GIF - else if (!strcmp(aMimeType, "image/gif")) + else if (!strcmp(aMimeType, IMAGE_GIF)) rv = eDecoderType_gif; // JPEG - else if (!strcmp(aMimeType, "image/jpeg")) + else if (!strcmp(aMimeType, IMAGE_JPEG)) rv = eDecoderType_jpeg; - else if (!strcmp(aMimeType, "image/pjpeg")) + else if (!strcmp(aMimeType, IMAGE_PJPEG)) rv = eDecoderType_jpeg; - else if (!strcmp(aMimeType, "image/jpg")) + else if (!strcmp(aMimeType, IMAGE_JPG)) rv = eDecoderType_jpeg; // BMP - else if (!strcmp(aMimeType, "image/bmp")) + else if (!strcmp(aMimeType, IMAGE_BMP)) rv = eDecoderType_bmp; - else if (!strcmp(aMimeType, "image/x-ms-bmp")) + else if (!strcmp(aMimeType, IMAGE_BMP_MS)) rv = eDecoderType_bmp; // ICO - else if (!strcmp(aMimeType, "image/x-icon")) + else if (!strcmp(aMimeType, IMAGE_ICO)) rv = eDecoderType_ico; - else if (!strcmp(aMimeType, "image/vnd.microsoft.icon")) + else if (!strcmp(aMimeType, IMAGE_ICO_MS)) rv = eDecoderType_ico; // Icon - else if (!strcmp(aMimeType, "image/icon")) + else if (!strcmp(aMimeType, IMAGE_ICON)) rv = eDecoderType_icon; return rv; diff --git a/image/src/ImageFactory.cpp b/image/src/ImageFactory.cpp index 8e0017adb5a..f779bcacc16 100644 --- a/image/src/ImageFactory.cpp +++ b/image/src/ImageFactory.cpp @@ -9,6 +9,7 @@ #include "nsIHttpChannel.h" #include "nsSimpleURI.h" +#include "nsMimeTypes.h" #include "RasterImage.h" #include "VectorImage.h" @@ -18,8 +19,6 @@ namespace mozilla { namespace image { -const char* SVG_MIMETYPE = "image/svg+xml"; - // Global preferences related to image containers. static bool gInitializedPrefCaches = false; static bool gDecodeOnDraw = false; @@ -89,7 +88,7 @@ ImageFactory::CreateImage(nsIRequest* aRequest, uint32_t imageFlags = ComputeImageFlags(aURI, aIsMultiPart); // Select the type of image to create based on MIME type. - if (aMimeType.Equals(SVG_MIMETYPE)) { + if (aMimeType.EqualsLiteral(IMAGE_SVG_XML)) { return CreateVectorImage(aRequest, aStatusTracker, aMimeType, aURI, imageFlags, aInnerWindowId); } else { diff --git a/image/src/ImageFactory.h b/image/src/ImageFactory.h index a285a3e5277..ccda5c231fd 100644 --- a/image/src/ImageFactory.h +++ b/image/src/ImageFactory.h @@ -15,8 +15,6 @@ namespace mozilla { namespace image { -extern const char* SVG_MIMETYPE; - struct ImageFactory { /** diff --git a/image/src/SVGDocumentWrapper.cpp b/image/src/SVGDocumentWrapper.cpp index 82e3524dcc6..deaa281d64a 100644 --- a/image/src/SVGDocumentWrapper.cpp +++ b/image/src/SVGDocumentWrapper.cpp @@ -342,7 +342,7 @@ SVGDocumentWrapper::SetupViewer(nsIRequest* aRequest, do_GetService(NS_CATEGORYMANAGER_CONTRACTID); NS_ENSURE_TRUE(catMan, NS_ERROR_NOT_AVAILABLE); nsXPIDLCString contractId; - nsresult rv = catMan->GetCategoryEntry("Gecko-Content-Viewers", SVG_MIMETYPE, + nsresult rv = catMan->GetCategoryEntry("Gecko-Content-Viewers", IMAGE_SVG_XML, getter_Copies(contractId)); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr docLoaderFactory = @@ -353,7 +353,7 @@ SVGDocumentWrapper::SetupViewer(nsIRequest* aRequest, nsCOMPtr listener; rv = docLoaderFactory->CreateInstance("external-resource", chan, newLoadGroup, - SVG_MIMETYPE, nullptr, nullptr, + IMAGE_SVG_XML, nullptr, nullptr, getter_AddRefs(listener), getter_AddRefs(viewer)); NS_ENSURE_SUCCESS(rv, rv); diff --git a/image/src/SVGDocumentWrapper.h b/image/src/SVGDocumentWrapper.h index 967390aad57..b58b558f097 100644 --- a/image/src/SVGDocumentWrapper.h +++ b/image/src/SVGDocumentWrapper.h @@ -15,6 +15,7 @@ #include "nsIObserver.h" #include "nsIContentViewer.h" #include "nsWeakReference.h" +#include "nsMimeTypes.h" class nsIAtom; class nsIPresShell; @@ -24,7 +25,6 @@ class nsIFrame; struct nsIntSize; class nsSVGSVGElement; -#define SVG_MIMETYPE "image/svg+xml" #define OBSERVER_SVC_CID "@mozilla.org/observer-service;1" diff --git a/image/src/VectorImage.cpp b/image/src/VectorImage.cpp index cb2bfddda23..d804a6fcdd3 100644 --- a/image/src/VectorImage.cpp +++ b/image/src/VectorImage.cpp @@ -14,6 +14,7 @@ #include "nsIObserverService.h" #include "nsIPresShell.h" #include "nsIStreamListener.h" +#include "nsMimeTypes.h" #include "nsComponentManagerUtils.h" #include "nsServiceManagerUtils.h" #include "nsSVGUtils.h" // for nsSVGUtils::ConvertToSurfaceSize @@ -204,7 +205,7 @@ VectorImage::Init(imgDecoderObserver* aObserver, if (aObserver) { mObserver = aObserver->asWeakPtr(); } - NS_ABORT_IF_FALSE(!strcmp(aMimeType, SVG_MIMETYPE), "Unexpected mimetype"); + NS_ABORT_IF_FALSE(!strcmp(aMimeType, IMAGE_SVG_XML), "Unexpected mimetype"); mIsInitialized = true; diff --git a/image/src/imgLoader.cpp b/image/src/imgLoader.cpp index db2c1facc4a..55ca428f943 100644 --- a/image/src/imgLoader.cpp +++ b/image/src/imgLoader.cpp @@ -25,6 +25,7 @@ #include "nsContentUtils.h" #include "nsCrossSiteListenerProxy.h" #include "nsNetUtil.h" +#include "nsMimeTypes.h" #include "nsStreamUtils.h" #include "nsIHttpChannel.h" #include "nsICachingChannel.h" @@ -957,7 +958,7 @@ void imgLoader::ReadAcceptHeaderPref() if (accept) mAcceptHeader = accept; else - mAcceptHeader = "image/png,image/*;q=0.8,*/*;q=0.5"; + mAcceptHeader = IMAGE_PNG "," IMAGE_WILDCARD ";q=0.8," ANY_WILDCARD ";q=0.5"; } /* void clearCache (in boolean chrome); */ @@ -1991,7 +1992,7 @@ nsresult imgLoader::GetMimeTypeFromContent(const char* aContents, uint32_t aLeng if (aLength >= 6 && (!nsCRT::strncmp(aContents, "GIF87a", 6) || !nsCRT::strncmp(aContents, "GIF89a", 6))) { - aContentType.AssignLiteral("image/gif"); + aContentType.AssignLiteral(IMAGE_GIF); } /* or a PNG? */ @@ -2004,7 +2005,7 @@ nsresult imgLoader::GetMimeTypeFromContent(const char* aContents, uint32_t aLeng (unsigned char)aContents[6]==0x1A && (unsigned char)aContents[7]==0x0A)) { - aContentType.AssignLiteral("image/png"); + aContentType.AssignLiteral(IMAGE_PNG); } /* maybe a JPEG (JFIF)? */ @@ -2019,7 +2020,7 @@ nsresult imgLoader::GetMimeTypeFromContent(const char* aContents, uint32_t aLeng ((unsigned char)aContents[1])==0xD8 && ((unsigned char)aContents[2])==0xFF) { - aContentType.AssignLiteral("image/jpeg"); + aContentType.AssignLiteral(IMAGE_JPEG); } /* or how about ART? */ @@ -2031,18 +2032,18 @@ nsresult imgLoader::GetMimeTypeFromContent(const char* aContents, uint32_t aLeng ((unsigned char) aContents[1])==0x47 && ((unsigned char) aContents[4])==0x00 ) { - aContentType.AssignLiteral("image/x-jg"); + aContentType.AssignLiteral(IMAGE_ART); } else if (aLength >= 2 && !nsCRT::strncmp(aContents, "BM", 2)) { - aContentType.AssignLiteral("image/bmp"); + aContentType.AssignLiteral(IMAGE_BMP); } // ICOs always begin with a 2-byte 0 followed by a 2-byte 1. // CURs begin with 2-byte 0 followed by 2-byte 2. else if (aLength >= 4 && (!memcmp(aContents, "\000\000\001\000", 4) || !memcmp(aContents, "\000\000\002\000", 4))) { - aContentType.AssignLiteral("image/x-icon"); + aContentType.AssignLiteral(IMAGE_ICO); } else { diff --git a/image/src/imgRequest.cpp b/image/src/imgRequest.cpp index dda406eb9e9..d7720910c20 100644 --- a/image/src/imgRequest.cpp +++ b/image/src/imgRequest.cpp @@ -31,6 +31,7 @@ #include "nsIHttpChannel.h" #include "nsIApplicationCache.h" #include "nsIApplicationCacheChannel.h" +#include "nsMimeTypes.h" #include "nsIComponentManager.h" #include "nsIInterfaceRequestorUtils.h" @@ -726,7 +727,7 @@ imgRequest::OnDataAvailable(nsIRequest *aRequest, nsISupports *ctxt, // type and decoder. // We always reinitialize for SVGs, because they have no way of // reinitializing themselves. - if (mContentType != newType || newType.Equals(SVG_MIMETYPE)) { + if (mContentType != newType || newType.EqualsLiteral(IMAGE_SVG_XML)) { mContentType = newType; // If we've resniffed our MIME type and it changed, we need to create a diff --git a/netwerk/mime/nsMimeTypes.h b/netwerk/mime/nsMimeTypes.h index 3356f0694c2..7e0282a1d16 100644 --- a/netwerk/mime/nsMimeTypes.h +++ b/netwerk/mime/nsMimeTypes.h @@ -16,6 +16,7 @@ instead, to help catch typos, and make central management of them easier. */ +#define ANY_WILDCARD "*/*" #define AUDIO_WILDCARD "audio/*" #define IMAGE_WILDCARD "image/*" @@ -81,9 +82,11 @@ #define BINARY_OCTET_STREAM "binary/octet-stream" #define IMAGE_GIF "image/gif" -#define IMAGE_JPG "image/jpeg" -#define IMAGE_PJPG "image/pjpeg" +#define IMAGE_JPEG "image/jpeg" +#define IMAGE_JPG "image/jpg" +#define IMAGE_PJPEG "image/pjpeg" #define IMAGE_PNG "image/png" +#define IMAGE_X_PNG "image/x-png" #define IMAGE_PPM "image/x-portable-pixmap" #define IMAGE_XBM "image/x-xbitmap" #define IMAGE_XBM2 "image/x-xbm" @@ -91,7 +94,10 @@ #define IMAGE_ART "image/x-jg" #define IMAGE_TIFF "image/tiff" #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 "image/icon" #define IMAGE_MNG "video/x-mng" #define IMAGE_JNG "image/x-jng" #define IMAGE_SVG_XML "image/svg+xml" diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp index ac59e44a375..9f18a16571e 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -381,8 +381,8 @@ static nsDefaultMimeTypeEntry defaultMimeEntries [] = { IMAGE_PNG, "png" }, // -- end extensions used during startup { TEXT_CSS, "css" }, - { IMAGE_JPG, "jpeg" }, - { IMAGE_JPG, "jpg" }, + { IMAGE_JPEG, "jpeg" }, + { IMAGE_JPEG, "jpg" }, { TEXT_HTML, "html" }, { TEXT_HTML, "htm" }, { APPLICATION_XPINSTALL, "xpi" }, @@ -460,7 +460,7 @@ static nsExtraMimeTypeEntry extraMimeEntries [] = { IMAGE_BMP, "bmp", "BMP Image" }, { IMAGE_GIF, "gif", "GIF Image" }, { IMAGE_ICO, "ico,cur", "ICO Image" }, - { IMAGE_JPG, "jpeg,jpg,jfif,pjpeg,pjp", "JPEG 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" },