From 38212bbbefbe5a8da8486448be2104f2fdfee85c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Sun, 29 Nov 2009 23:18:53 +0100 Subject: [PATCH] Bug 124709. Treat application/mathml+xml as an XML type. r=bzbarsky --- layout/build/nsContentDLF.cpp | 3 +++ netwerk/mime/public/nsMimeTypes.h | 1 + parser/htmlparser/src/CParserContext.cpp | 3 +++ 3 files changed, 7 insertions(+) diff --git a/layout/build/nsContentDLF.cpp b/layout/build/nsContentDLF.cpp index 8643da4d4c5e..32a563e39d5b 100644 --- a/layout/build/nsContentDLF.cpp +++ b/layout/build/nsContentDLF.cpp @@ -107,6 +107,9 @@ static const char* const gHTMLTypes[] = { static const char* const gXMLTypes[] = { TEXT_XML, APPLICATION_XML, +#ifdef MOZ_MATHML + APPLICATION_MATHML_XML, +#endif APPLICATION_RDF_XML, TEXT_RDF, 0 diff --git a/netwerk/mime/public/nsMimeTypes.h b/netwerk/mime/public/nsMimeTypes.h index 5fa6710a7a31..be8c71bcff45 100644 --- a/netwerk/mime/public/nsMimeTypes.h +++ b/netwerk/mime/public/nsMimeTypes.h @@ -98,6 +98,7 @@ #define APPLICATION_XPINSTALL "application/x-xpinstall" #define APPLICATION_XML "application/xml" #define APPLICATION_XHTML_XML "application/xhtml+xml" +#define APPLICATION_MATHML_XML "application/mathml+xml" #define APPLICATION_RDF_XML "application/rdf+xml" #define AUDIO_BASIC "audio/basic" diff --git a/parser/htmlparser/src/CParserContext.cpp b/parser/htmlparser/src/CParserContext.cpp index 1bfbd0b1e131..28765c356b20 100644 --- a/parser/htmlparser/src/CParserContext.cpp +++ b/parser/htmlparser/src/CParserContext.cpp @@ -89,6 +89,9 @@ CParserContext::SetMimeType(const nsACString& aMimeType) mMimeType.EqualsLiteral(TEXT_XUL) || #ifdef MOZ_SVG mMimeType.EqualsLiteral(IMAGE_SVG_XML) || +#endif +#ifdef MOZ_MATHML + mMimeType.EqualsLiteral(APPLICATION_MATHML_XML) || #endif mMimeType.EqualsLiteral(APPLICATION_RDF_XML) || mMimeType.EqualsLiteral(TEXT_RDF))