From 7b5a59b32dff953688ea406c1ed0063018af8ae6 Mon Sep 17 00:00:00 2001 From: "blakeross%telocity.com" Date: Sun, 25 Mar 2001 16:49:38 +0000 Subject: [PATCH] Removing non-compliant text/xul mimetype, replacing with application/vnd.mozilla.xul+xml (28237, patch by gerv@gerv.net). r=blake sr=hyatt --- chrome/src/nsChromeProtocolHandler.cpp | 2 +- content/build/nsContentDLF.cpp | 4 +- content/build/nsContentModule.cpp | 2 +- content/xul/document/src/nsXULDocument.cpp | 5 +- docshell/base/nsDSURIContentListener.cpp | 6 +- .../browser/gtk/src/EmbedContentListener.cpp | 2 +- .../browser/photon/src/PhMozEmbedChrome.cpp | 2 +- .../webBrowser/nsWBURIContentListener.cpp | 210 ------------------ gfx/src/nsImageNetContextAsync.cpp | 2 +- htmlparser/src/nsIParser.h | 2 +- layout/build/nsContentDLF.cpp | 4 +- layout/build/nsLayoutDLF.cpp | 4 +- mailnews/base/src/nsMessenger.cpp | 2 +- mailnews/compose/src/nsMsgQuote.cpp | 2 +- mailnews/mime/build/nsMsgMimeCID.h | 2 +- .../mime/emitters/build/nsMimeEmitterCID.h | 2 +- mailnews/mime/src/nsStreamConverter.cpp | 9 +- netwerk/mime/public/nsMimeTypes.h | 2 +- parser/htmlparser/src/nsIParser.h | 2 +- rdf/chrome/src/nsChromeProtocolHandler.cpp | 2 +- xpfe/browser/src/nsBrowserInstance.cpp | 6 +- .../directory/nsDirectoryViewer.cpp | 4 +- 22 files changed, 35 insertions(+), 243 deletions(-) diff --git a/chrome/src/nsChromeProtocolHandler.cpp b/chrome/src/nsChromeProtocolHandler.cpp index 7495c80389f..36ee9e0f481 100644 --- a/chrome/src/nsChromeProtocolHandler.cpp +++ b/chrome/src/nsChromeProtocolHandler.cpp @@ -327,7 +327,7 @@ nsCachedChromeChannel::SetNotificationCallbacks(nsIInterfaceRequestor * aNotific NS_IMETHODIMP nsCachedChromeChannel::GetContentType(char * *aContentType) { - *aContentType = nsXPIDLCString::Copy("text/cached-xul"); + *aContentType = nsXPIDLCString::Copy("mozilla.application/cached-xul"); return *aContentType ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } diff --git a/content/build/nsContentDLF.cpp b/content/build/nsContentDLF.cpp index af12814b443..a7b8fd32b50 100644 --- a/content/build/nsContentDLF.cpp +++ b/content/build/nsContentDLF.cpp @@ -73,8 +73,8 @@ static char* gXMLTypes[] = { static char* gRDFTypes[] = { "text/rdf", - "text/xul", - "text/cached-xul", + "application/vnd.mozilla.xul+xml", + "mozilla.application/cached-xul", 0 }; diff --git a/content/build/nsContentModule.cpp b/content/build/nsContentModule.cpp index e3c618b3970..206d1b3cb5b 100644 --- a/content/build/nsContentModule.cpp +++ b/content/build/nsContentModule.cpp @@ -339,7 +339,7 @@ static Components gComponents[] = { { "HTML content serializer", NS_HTMLCONTENTSERIALIZER_CID, NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/html", }, { "XUL content serializer", NS_XMLCONTENTSERIALIZER_CID, - NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/xul", }, + NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/vnd.mozilla.xul+xml", }, { "plaintext content serializer", NS_PLAINTEXTSERIALIZER_CID, NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/plain", }, { "plaintext sink", NS_PLAINTEXTSERIALIZER_CID, diff --git a/content/xul/document/src/nsXULDocument.cpp b/content/xul/document/src/nsXULDocument.cpp index 1a90b517417..ae2e2523447 100644 --- a/content/xul/document/src/nsXULDocument.cpp +++ b/content/xul/document/src/nsXULDocument.cpp @@ -613,7 +613,7 @@ nsXULDocument::GetArena() NS_IMETHODIMP nsXULDocument::GetContentType(nsAWritableString& aContentType) const { - aContentType.Assign(NS_LITERAL_STRING("text/xul")); + aContentType.Assign(NS_LITERAL_STRING("application/vnd.mozilla.xul+xml")); return NS_OK; } @@ -707,7 +707,8 @@ nsXULDocument::StartDocumentLoad(const char* aCommand, nsXPIDLCString contentType; aChannel->GetContentType(getter_Copies(contentType)); - if (contentType && PL_strcmp(contentType, "text/cached-xul") == 0) { + if (contentType && + PL_strcmp(contentType, "mozilla.application/cached-xul") == 0) { // Look in the chrome cache: we've got this puppy loaded // already. nsCOMPtr proto; diff --git a/docshell/base/nsDSURIContentListener.cpp b/docshell/base/nsDSURIContentListener.cpp index af965962ef1..d3c14d18ff1 100644 --- a/docshell/base/nsDSURIContentListener.cpp +++ b/docshell/base/nsDSURIContentListener.cpp @@ -152,7 +152,7 @@ NS_IMETHODIMP nsDSURIContentListener::CanHandleContent(const char* aContentType, // from the registry and in addition, we want to // incoming Type Preferred type // text/html - // text/xul + // application/vnd.mozilla.xul+xml // text/rdf // text/xml // text/css @@ -161,14 +161,14 @@ NS_IMETHODIMP nsDSURIContentListener::CanHandleContent(const char* aContentType, // image/png // image/tiff // application/http-index-format - // message/rfc822 text/xul + // message/rfc822 application/vnd.mozilla.xul+xml if (aContentType) { // (1) list all content types we want to be the primary handler for.... // and suggest a desired content type if appropriate... if (nsCRT::strcasecmp(aContentType, "text/html") == 0 - || nsCRT::strcasecmp(aContentType, "text/xul") == 0 + || nsCRT::strcasecmp(aContentType, "application/vnd.mozilla.xul+xml") == 0 || nsCRT::strcasecmp(aContentType, "text/rdf") == 0 || nsCRT::strcasecmp(aContentType, "text/xml") == 0 || nsCRT::strcasecmp(aContentType, "text/css") == 0 diff --git a/embedding/browser/gtk/src/EmbedContentListener.cpp b/embedding/browser/gtk/src/EmbedContentListener.cpp index c1f900ad156..202eb9b7b72 100644 --- a/embedding/browser/gtk/src/EmbedContentListener.cpp +++ b/embedding/browser/gtk/src/EmbedContentListener.cpp @@ -96,7 +96,7 @@ EmbedContentListener::IsPreferred(const char *aContentType, if (aContentType && (!strcasecmp(aContentType, "text/html") || !strcasecmp(aContentType, "text/plain") || - !strcasecmp(aContentType, "text/xul") || + !strcasecmp(aContentType, "application/vnd.mozilla.xul+xml") || !strcasecmp(aContentType, "text/rdf") || !strcasecmp(aContentType, "text/xml") || !strcasecmp(aContentType, "text/css") || diff --git a/embedding/browser/photon/src/PhMozEmbedChrome.cpp b/embedding/browser/photon/src/PhMozEmbedChrome.cpp index 44c91666082..9b51bd17003 100644 --- a/embedding/browser/photon/src/PhMozEmbedChrome.cpp +++ b/embedding/browser/photon/src/PhMozEmbedChrome.cpp @@ -501,7 +501,7 @@ NS_IMETHODIMP PhMozEmbedChrome::IsPreferred(const char *aContentType, nsURILoadC { PR_LOG(mozEmbedLm, PR_LOG_DEBUG, ("checking content type %s\n", aContentType)); if (nsCRT::strcasecmp(aContentType, "text/html") == 0 - || nsCRT::strcasecmp(aContentType, "text/xul") == 0 + || nsCRT::strcasecmp(aContentType, "application/vnd.mozilla.xul+xml") == 0 || nsCRT::strcasecmp(aContentType, "text/rdf") == 0 || nsCRT::strcasecmp(aContentType, "text/xml") == 0 || nsCRT::strcasecmp(aContentType, "text/css") == 0 diff --git a/embedding/browser/webBrowser/nsWBURIContentListener.cpp b/embedding/browser/webBrowser/nsWBURIContentListener.cpp index 72cf6bce23c..e69de29bb2d 100644 --- a/embedding/browser/webBrowser/nsWBURIContentListener.cpp +++ b/embedding/browser/webBrowser/nsWBURIContentListener.cpp @@ -1,210 +0,0 @@ -/* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Mozilla browser. - * - * The Initial Developer of the Original Code is Netscape - * Communications, Inc. Portions created by Netscape are - * Copyright (C) 1999, Mozilla. All Rights Reserved. - * - * Contributor(s): - * Travis Bogard - */ - -// Local Includes -#include "nsWebBrowser.h" -#include "nsWBURIContentListener.h" - -// Interfaces Needed -#include "nsIChannel.h" - -//***************************************************************************** -//*** nsWBURIContentListener: Object Management -//***************************************************************************** - -nsWBURIContentListener::nsWBURIContentListener() : mWebBrowser(nsnull), - mParentContentListener(nsnull) -{ - NS_INIT_REFCNT(); -} - -nsWBURIContentListener::~nsWBURIContentListener() -{ -} - -//***************************************************************************** -// nsWBURIContentListener::nsISupports -//***************************************************************************** - -NS_IMPL_ADDREF(nsWBURIContentListener) -NS_IMPL_RELEASE(nsWBURIContentListener) - -NS_INTERFACE_MAP_BEGIN(nsWBURIContentListener) - NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIURIContentListener) - NS_INTERFACE_MAP_ENTRY(nsIURIContentListener) -NS_INTERFACE_MAP_END - -//***************************************************************************** -// nsWBURIContentListener::nsIURIContentListener -//***************************************************************************** - -NS_IMETHODIMP nsWBURIContentListener::OnStartURIOpen(nsIURI* aURI, - const char* aWindowTarget, PRBool* aAbortOpen) -{ - if(mParentContentListener) - { - nsresult rv = mParentContentListener->OnStartURIOpen(aURI, aWindowTarget, - aAbortOpen); - - if(NS_ERROR_NOT_IMPLEMENTED != rv) - return rv; - } - - return NS_OK; -} - -NS_IMETHODIMP nsWBURIContentListener::GetProtocolHandler(nsIURI* aURI, - nsIProtocolHandler** aProtocolHandler) -{ - NS_ENSURE_ARG_POINTER(aProtocolHandler); - NS_ENSURE_ARG(aURI); - - if(mParentContentListener) - { - nsresult rv = mParentContentListener->GetProtocolHandler(aURI, - aProtocolHandler); - - if(NS_ERROR_NOT_IMPLEMENTED != rv) - return rv; - } - *aProtocolHandler = nsnull; - - return NS_OK; -} - -NS_IMETHODIMP nsWBURIContentListener::DoContent(const char* aContentType, - nsURILoadCommand aCommand, const char* aWindowTarget, - nsIRequest* request, nsIStreamListener** aContentHandler, - PRBool* aAbortProcess) -{ - NS_ERROR("Hmmmm, why is this getting called on this object?"); - return NS_OK; -} - -NS_IMETHODIMP nsWBURIContentListener::IsPreferred(const char* aContentType, - nsURILoadCommand aCommand, const char* aWindowTarget, char ** aDesiredContentType, - PRBool* aCanHandle) -{ - NS_ENSURE_ARG_POINTER(aCanHandle); - NS_ENSURE_ARG_POINTER(aDesiredContentType); - - if(mParentContentListener) - { - nsresult rv = mParentContentListener->IsPreferred(aContentType, - aCommand, aWindowTarget, aDesiredContentType, aCanHandle); - - if(NS_ERROR_NOT_IMPLEMENTED != rv) - return rv; - } - - *aCanHandle = PR_FALSE; - // the webbrowser object is the primary content handler for the following types: - // If we are asked to handle any of these types, we will always say Yes! - // regardlesss of the uri load command. - // incoming Type Preferred type - // text/html - // text/xul - // text/rdf - // text/xml - // text/css - // image/gif - // image/jpeg - // image/png - // image/tiff - // application/http-index-format - - if(aContentType) - { - // (1) list all content types we want to be the primary handler for.... - // and suggest a desired content type if appropriate... - if(nsCRT::strcasecmp(aContentType, "text/html") == 0 - || nsCRT::strcasecmp(aContentType, "text/xul") == 0 - || nsCRT::strcasecmp(aContentType, "text/rdf") == 0 - || nsCRT::strcasecmp(aContentType, "text/xml") == 0 - || nsCRT::strcasecmp(aContentType, "text/css") == 0 - || nsCRT::strcasecmp(aContentType, "image/gif") == 0 - || nsCRT::strcasecmp(aContentType, "image/jpeg") == 0 - || nsCRT::strcasecmp(aContentType, "image/png") == 0 - || nsCRT::strcasecmp(aContentType, "image/tiff") == 0 - || nsCRT::strcasecmp(aContentType, "application/http-index-format") == 0) - *aCanHandle = PR_TRUE; - } - - return NS_OK; -} - -NS_IMETHODIMP nsWBURIContentListener::CanHandleContent(const char* aContentType, - nsURILoadCommand aCommand, const char* aWindowTarget, char ** aDesiredContentType, - PRBool* aCanHandleContent) -{ - NS_ERROR("Hmmmm, why is this getting called?"); - return NS_OK; -} - -NS_IMETHODIMP nsWBURIContentListener::GetLoadCookie(nsISupports ** aLoadCookie) -{ - NS_ENSURE_ARG_POINTER(aLoadCookie); - *aLoadCookie = nsnull; - return NS_OK; -} - -NS_IMETHODIMP nsWBURIContentListener::SetLoadCookie(nsISupports * aLoadCookie) -{ - NS_ERROR("Hmmmm, why is this getting called?"); - return NS_OK; -} - -NS_IMETHODIMP nsWBURIContentListener::GetParentContentListener(nsIURIContentListener** - aParentListener) -{ - NS_ENSURE_ARG_POINTER(aParentListener); - - *aParentListener = mParentContentListener; - NS_IF_ADDREF(*aParentListener); - return NS_OK; -} - -NS_IMETHODIMP nsWBURIContentListener::SetParentContentListener(nsIURIContentListener* - aParentListener) -{ - // Weak Reference, don't addref - mParentContentListener = aParentListener; - return NS_OK; -} - -//***************************************************************************** -// nsWBURIContentListener: Helpers -//***************************************************************************** - -//***************************************************************************** -// nsWBURIContentListener: Accessors -//***************************************************************************** - -void nsWBURIContentListener::WebBrowser(nsWebBrowser* aWebBrowser) -{ - mWebBrowser = aWebBrowser; -} - -nsWebBrowser* nsWBURIContentListener::WebBrowser() -{ - return mWebBrowser; -} diff --git a/gfx/src/nsImageNetContextAsync.cpp b/gfx/src/nsImageNetContextAsync.cpp index 408794e691c..b3f45ec229a 100644 --- a/gfx/src/nsImageNetContextAsync.cpp +++ b/gfx/src/nsImageNetContextAsync.cpp @@ -251,7 +251,7 @@ ImageConsumer::CanHandleContent(const char * aContentType, // if we had a webshell or doc shell around, we'd pass this call // through to it...but we don't =( if (!nsCRT::strcasecmp(aContentType, "message/rfc822")) - *aDesiredContentType = nsCRT::strdup("text/xul"); + *aDesiredContentType = nsCRT::strdup("application/vnd.mozilla.xul+xml"); // since we explicilty loaded the url, we always want to handle it! *aCanHandleContent = PR_TRUE; diff --git a/htmlparser/src/nsIParser.h b/htmlparser/src/nsIParser.h index c71720044d9..410987698e1 100644 --- a/htmlparser/src/nsIParser.h +++ b/htmlparser/src/nsIParser.h @@ -354,7 +354,7 @@ const PRUnichar kNullCh = '\0'; #define kHTMLTextContentType "text/html" #define kXMLTextContentType "text/xml" -#define kXULTextContentType "text/xul" +#define kXULTextContentType "application/vnd.mozilla.xul+xml" #define kRDFTextContentType "text/rdf" #define kXIFTextContentType "text/xif" #define kPlainTextContentType "text/plain" diff --git a/layout/build/nsContentDLF.cpp b/layout/build/nsContentDLF.cpp index af12814b443..a7b8fd32b50 100644 --- a/layout/build/nsContentDLF.cpp +++ b/layout/build/nsContentDLF.cpp @@ -73,8 +73,8 @@ static char* gXMLTypes[] = { static char* gRDFTypes[] = { "text/rdf", - "text/xul", - "text/cached-xul", + "application/vnd.mozilla.xul+xml", + "mozilla.application/cached-xul", 0 }; diff --git a/layout/build/nsLayoutDLF.cpp b/layout/build/nsLayoutDLF.cpp index b4db4fa62b1..7b5f20137ce 100644 --- a/layout/build/nsLayoutDLF.cpp +++ b/layout/build/nsLayoutDLF.cpp @@ -75,8 +75,8 @@ static char* gXMLTypes[] = { static char* gRDFTypes[] = { "text/rdf", - "text/xul", - "text/cached-xul", + "application/vnd.mozilla.xul+xml", + "mozilla.application/cached-xul", 0 }; diff --git a/mailnews/base/src/nsMessenger.cpp b/mailnews/base/src/nsMessenger.cpp index 631e8e17f0a..61368fe4cd2 100644 --- a/mailnews/base/src/nsMessenger.cpp +++ b/mailnews/base/src/nsMessenger.cpp @@ -598,7 +598,7 @@ nsMessenger::SaveAttachment(nsIFileSpec * fileSpec, if (NS_FAILED(rv)) goto done; from.AssignWithConversion(MESSAGE_RFC822); - to.AssignWithConversion("text/xul"); + to.AssignWithConversion("application/vnd.mozilla.xul+xml"); channelSupport = do_QueryInterface(aListener->m_channel); diff --git a/mailnews/compose/src/nsMsgQuote.cpp b/mailnews/compose/src/nsMsgQuote.cpp index 831719fb409..5daf6bb6b69 100644 --- a/mailnews/compose/src/nsMsgQuote.cpp +++ b/mailnews/compose/src/nsMsgQuote.cpp @@ -214,7 +214,7 @@ nsMsgQuote::QuoteMessage(const char *msgURI, PRBool quoteHeaders, nsIStreamListe nsCOMPtr convertedListener; rv = streamConverterService->AsyncConvertData(NS_LITERAL_STRING("message/rfc822").get(), - NS_LITERAL_STRING("text/xul").get(), + NS_LITERAL_STRING("application/vnd.mozilla.xul+xml").get(), mStreamListener, quoteSupport, getter_AddRefs(convertedListener)); diff --git a/mailnews/mime/build/nsMsgMimeCID.h b/mailnews/mime/build/nsMsgMimeCID.h index 5ed5920e89f..d9464018d9b 100644 --- a/mailnews/mime/build/nsMsgMimeCID.h +++ b/mailnews/mime/build/nsMsgMimeCID.h @@ -27,7 +27,7 @@ "@mozilla.org/messenger/headerparser;1" #define NS_MAILNEWS_MIME_STREAM_CONVERTER_CONTRACTID \ - NS_ISTREAMCONVERTER_KEY "?from=message/rfc822&to=text/xul" + NS_ISTREAMCONVERTER_KEY "?from=message/rfc822&to=application/vnd.mozilla.xul+xml" #define NS_MAILNEWS_MIME_STREAM_CONVERTER_CONTRACTID1 \ NS_ISTREAMCONVERTER_KEY "?from=message/rfc822&to=text/html" diff --git a/mailnews/mime/emitters/build/nsMimeEmitterCID.h b/mailnews/mime/emitters/build/nsMimeEmitterCID.h index 24f0b5a032d..335a76081d4 100644 --- a/mailnews/mime/emitters/build/nsMimeEmitterCID.h +++ b/mailnews/mime/emitters/build/nsMimeEmitterCID.h @@ -52,7 +52,7 @@ { 0xa4, 0x11, 0x0, 0x80, 0x5f, 0x61, 0x3c, 0x79 } } #define NS_XUL_MIME_EMITTER_CONTRACTID \ - NS_MIME_EMITTER_CONTRACTID_PREFIX "text/xul" + NS_MIME_EMITTER_CONTRACTID_PREFIX "application/vnd.mozilla.xul+xml" // {FAA8AF16-DCFF-11d2-A411-00805F613C19} #define NS_XUL_MIME_EMITTER_CID \ { 0xfaa8af16, 0xdcff, 0x11d2, \ diff --git a/mailnews/mime/src/nsStreamConverter.cpp b/mailnews/mime/src/nsStreamConverter.cpp index 6a63fedc819..dcb7c34199e 100644 --- a/mailnews/mime/src/nsStreamConverter.cpp +++ b/mailnews/mime/src/nsStreamConverter.cpp @@ -425,13 +425,14 @@ nsStreamConverter::DetermineOutputFormat(const char *url, nsMimeOutputType *aNe { // okay, we are just doing a regular message display url // since we didn't have any special extensions after the url... - // we need to know if we need to use the text/xul or text/html emitter. + // we need to know if we need to use the application/vnd.mozilla.xul+xml + // or text/html emitter. // check the desired output content type that was passed into AsyncConvertData. - if (mDesiredOutputType && nsCRT::strcasecmp(mDesiredOutputType, "text/xul") == 0) + if (mDesiredOutputType && nsCRT::strcasecmp(mDesiredOutputType, "application/vnd.mozilla.xul+xml") == 0) { CRTFREEIF(mOutputFormat); - mOutputFormat = nsCRT::strdup("text/xul"); + mOutputFormat = nsCRT::strdup("application/vnd.mozilla.xul+xml"); *aNewType = nsMimeOutput::nsMimeMessageXULDisplay; } else @@ -557,7 +558,7 @@ NS_IMETHODIMP nsStreamConverter::Init(nsIURI *aURI, nsIStreamListener * aOutList { case nsMimeOutput::nsMimeMessageXULDisplay: CRTFREEIF(mOutputFormat); - mOutputFormat = nsCRT::strdup("text/xul"); + mOutputFormat = nsCRT::strdup("application/vnd.mozilla.xul+xml"); break; case nsMimeOutput::nsMimeMessageSplitDisplay: // the wrapper HTML output to produce the split header/body display mWrapperOutput = PR_TRUE; diff --git a/netwerk/mime/public/nsMimeTypes.h b/netwerk/mime/public/nsMimeTypes.h index c6ae9a0ef42..9227a2ac84b 100644 --- a/netwerk/mime/public/nsMimeTypes.h +++ b/netwerk/mime/public/nsMimeTypes.h @@ -112,7 +112,7 @@ #define TEXT_JSSS "text/jsss" #define TEXT_XML "text/xml" #define TEXT_RDF "text/rdf" -#define TEXT_XUL "text/xul" +#define TEXT_XUL "application/vnd.mozilla.xul+xml" #define TEXT_RTF "text/rtf" #define TEXT_CPP "text/cpp" diff --git a/parser/htmlparser/src/nsIParser.h b/parser/htmlparser/src/nsIParser.h index c71720044d9..410987698e1 100644 --- a/parser/htmlparser/src/nsIParser.h +++ b/parser/htmlparser/src/nsIParser.h @@ -354,7 +354,7 @@ const PRUnichar kNullCh = '\0'; #define kHTMLTextContentType "text/html" #define kXMLTextContentType "text/xml" -#define kXULTextContentType "text/xul" +#define kXULTextContentType "application/vnd.mozilla.xul+xml" #define kRDFTextContentType "text/rdf" #define kXIFTextContentType "text/xif" #define kPlainTextContentType "text/plain" diff --git a/rdf/chrome/src/nsChromeProtocolHandler.cpp b/rdf/chrome/src/nsChromeProtocolHandler.cpp index 7495c80389f..36ee9e0f481 100644 --- a/rdf/chrome/src/nsChromeProtocolHandler.cpp +++ b/rdf/chrome/src/nsChromeProtocolHandler.cpp @@ -327,7 +327,7 @@ nsCachedChromeChannel::SetNotificationCallbacks(nsIInterfaceRequestor * aNotific NS_IMETHODIMP nsCachedChromeChannel::GetContentType(char * *aContentType) { - *aContentType = nsXPIDLCString::Copy("text/cached-xul"); + *aContentType = nsXPIDLCString::Copy("mozilla.application/cached-xul"); return *aContentType ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } diff --git a/xpfe/browser/src/nsBrowserInstance.cpp b/xpfe/browser/src/nsBrowserInstance.cpp index 37aff5ce97f..1e1787f154e 100644 --- a/xpfe/browser/src/nsBrowserInstance.cpp +++ b/xpfe/browser/src/nsBrowserInstance.cpp @@ -1088,7 +1088,7 @@ nsBrowserInstance::IsPreferred(const char * aContentType, // regardlesss of the uri load command. // incoming Type Preferred type // text/html - // text/xul + // application/vnd.mozilla.xul+xml // text/rdf // text/xml // text/css @@ -1103,7 +1103,7 @@ nsBrowserInstance::IsPreferred(const char * aContentType, // (1) list all content types we want to be the primary handler for.... // and suggest a desired content type if appropriate... if (nsCRT::strcasecmp(aContentType, "text/html") == 0 - || nsCRT::strcasecmp(aContentType, "text/xul") == 0 + || nsCRT::strcasecmp(aContentType, "application/vnd.mozilla.xul+xml") == 0 || nsCRT::strcasecmp(aContentType, "text/rdf") == 0 || nsCRT::strcasecmp(aContentType, "text/xml") == 0 || nsCRT::strcasecmp(aContentType, "text/css") == 0 @@ -1551,7 +1551,7 @@ static nsModuleComponentInfo components[] = { }, { "Browser Content Handler", NS_BROWSERCONTENTHANDLER_CID, - NS_CONTENT_HANDLER_CONTRACTID_PREFIX"text/xul", + NS_CONTENT_HANDLER_CONTRACTID_PREFIX"application/vnd.mozilla.xul+xml", nsBrowserContentHandlerConstructor }, { "Browser Content Handler", diff --git a/xpfe/components/directory/nsDirectoryViewer.cpp b/xpfe/components/directory/nsDirectoryViewer.cpp index 03fd2b6701a..a6e1db9846f 100644 --- a/xpfe/components/directory/nsDirectoryViewer.cpp +++ b/xpfe/components/directory/nsDirectoryViewer.cpp @@ -1778,7 +1778,7 @@ nsDirectoryViewerFactory::CreateInstance(const char *aCommand, // Create a dummy loader that will load a stub XUL document. nsCOMPtr factory; - rv = nsComponentManager::CreateInstance(NS_DOCUMENT_LOADER_FACTORY_CONTRACTID_PREFIX "view;1?type=text/xul", + rv = nsComponentManager::CreateInstance(NS_DOCUMENT_LOADER_FACTORY_CONTRACTID_PREFIX "view;1?type=application/vnd.mozilla.xul+xml", nsnull, NS_GET_IID(nsIDocumentLoaderFactory), getter_AddRefs(factory)); @@ -1793,7 +1793,7 @@ nsDirectoryViewerFactory::CreateInstance(const char *aCommand, if (NS_FAILED(rv)) return rv; nsCOMPtr listener; - rv = factory->CreateInstance("view", channel, aLoadGroup, "text/xul", + rv = factory->CreateInstance("view", channel, aLoadGroup, "application/vnd.mozilla.xul+xml", aContainer, aExtraInfo, getter_AddRefs(listener), aDocViewerResult); if (NS_FAILED(rv)) return rv;