From 42877f4e0fa1a0a2be0ced38165d7fd4f6df142f Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Sun, 8 Aug 2004 01:31:02 +0000 Subject: [PATCH] Add support for the application/rdf+xml MIME type. Bug 61839, patch by Alex Vincent , r=bzbarsky, sr=jst git-svn-id: svn://10.0.0.236/trunk@160482 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/build/nsContentDLF.cpp | 1 + mozilla/netwerk/mime/public/nsMimeTypes.h | 1 + mozilla/parser/htmlparser/public/nsIParser.h | 1 + mozilla/parser/htmlparser/src/CParserContext.cpp | 1 + mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp | 4 ++-- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/build/nsContentDLF.cpp b/mozilla/layout/build/nsContentDLF.cpp index 13777055120..37603c7c709 100644 --- a/mozilla/layout/build/nsContentDLF.cpp +++ b/mozilla/layout/build/nsContentDLF.cpp @@ -114,6 +114,7 @@ static char* gSVGTypes[] = { #endif static const char* const gRDFTypes[] = { + "application/rdf+xml", "text/rdf", "application/vnd.mozilla.xul+xml", "mozilla.application/cached-xul", diff --git a/mozilla/netwerk/mime/public/nsMimeTypes.h b/mozilla/netwerk/mime/public/nsMimeTypes.h index 81c935045c9..a2d867965ab 100644 --- a/mozilla/netwerk/mime/public/nsMimeTypes.h +++ b/mozilla/netwerk/mime/public/nsMimeTypes.h @@ -73,6 +73,7 @@ #define APPLICATION_POSTSCRIPT "application/postscript" #define APPLICATION_PDF "application/pdf" #define APPLICATION_PRE_ENCRYPTED "application/pre-encrypted" +#define APPLICATION_RDF "application/rdf+xml" #define APPLICATION_UUENCODE "application/x-uuencode" #define APPLICATION_UUENCODE2 "application/x-uue" #define APPLICATION_UUENCODE3 "application/uuencode" diff --git a/mozilla/parser/htmlparser/public/nsIParser.h b/mozilla/parser/htmlparser/public/nsIParser.h index 95ff8fb25a4..5bab740944c 100644 --- a/mozilla/parser/htmlparser/public/nsIParser.h +++ b/mozilla/parser/htmlparser/public/nsIParser.h @@ -363,6 +363,7 @@ const PRUnichar kNullCh = '\0'; #define kXHTMLApplicationContentType "application/xhtml+xml" #define kXULTextContentType "application/vnd.mozilla.xul+xml" #define kRDFTextContentType "text/rdf" +#define kRDFApplicationContentType "application/rdf+xml" #define kXIFTextContentType "text/xif" #define kPlainTextContentType "text/plain" #define kViewSourceCommand "view-source" diff --git a/mozilla/parser/htmlparser/src/CParserContext.cpp b/mozilla/parser/htmlparser/src/CParserContext.cpp index ab522cddca8..36f0b58181a 100644 --- a/mozilla/parser/htmlparser/src/CParserContext.cpp +++ b/mozilla/parser/htmlparser/src/CParserContext.cpp @@ -163,6 +163,7 @@ void CParserContext::SetMimeType(const nsACString& aMimeType){ #ifdef MOZ_SVG mMimeType.EqualsLiteral(kSVGTextContentType) || #endif + mMimeType.EqualsLiteral(kRDFApplicationContentType) || mMimeType.EqualsLiteral(kRDFTextContentType)) mDocType=eXML; } diff --git a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp index 1dbb1694931..657e4966c73 100644 --- a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -339,7 +339,7 @@ static nsDefaultMimeTypeEntry defaultMimeEntries [] = // sorted by order used { IMAGE_GIF, "gif" }, { TEXT_XML, "xml" }, - { TEXT_RDF, "rdf" }, + { APPLICATION_RDF, "rdf" }, { TEXT_XUL, "xul" }, { IMAGE_PNG, "png" }, // -- end extensions used during startup @@ -405,7 +405,7 @@ static nsExtraMimeTypeEntry extraMimeEntries [] = { TEXT_PLAIN, "txt,text", "Text File", MAC_TYPE('TEXT'), MAC_TYPE('ttxt') }, { TEXT_HTML, "html,htm,shtml,ehtml", "HyperText Markup Language", MAC_TYPE('TEXT'), MAC_TYPE('MOSS') }, { "application/xhtml+xml", "xhtml,xht", "Extensible HyperText Markup Language", MAC_TYPE('TEXT'), MAC_TYPE('ttxt') }, - { TEXT_RDF, "rdf", "Resource Description Framework", MAC_TYPE('TEXT'), MAC_TYPE('ttxt') }, + { APPLICATION_RDF, "rdf", "Resource Description Framework", MAC_TYPE('TEXT'), MAC_TYPE('ttxt') }, { TEXT_XUL, "xul", "XML-Based User Interface Language", MAC_TYPE('TEXT'), MAC_TYPE('ttxt') }, { TEXT_XML, "xml,xsl,xbl", "Extensible Markup Language", MAC_TYPE('TEXT'), MAC_TYPE('ttxt') }, { TEXT_CSS, "css", "Style Sheet", MAC_TYPE('TEXT'), MAC_TYPE('ttxt') },