зеркало из https://github.com/mozilla/gecko-dev.git
Bug 286073 internal code should use application/xml rather than text/xml
patch by bug@annevankesteren.nl r=peterv sr=peterv
This commit is contained in:
Родитель
58a5b2b931
Коммит
497ed774fe
|
@ -445,7 +445,7 @@ CheckLoadURI(nsIURI *aUri, nsIURI *aReferrerUri,
|
|||
PRInt16 decision = nsIContentPolicy::ACCEPT;
|
||||
rv = NS_CheckContentLoadPolicy(nsIContentPolicy::TYPE_STYLESHEET,
|
||||
aUri, aReferrerUri, aContext,
|
||||
NS_LITERAL_CSTRING("text/xml"), nsnull,
|
||||
NS_LITERAL_CSTRING("application/xml"), nsnull,
|
||||
&decision);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
|
@ -759,7 +759,7 @@ txMozillaXMLOutput::createResultDocument(const nsAString& aName, PRInt32 aNsID,
|
|||
doc->SetContentType(NS_LITERAL_STRING("text/html"));
|
||||
}
|
||||
else {
|
||||
doc->SetContentType(NS_LITERAL_STRING("text/xml"));
|
||||
doc->SetContentType(NS_LITERAL_STRING("application/xml"));
|
||||
}
|
||||
|
||||
// Set up script loader of the result document.
|
||||
|
|
|
@ -235,10 +235,10 @@ txStandaloneXSLTProcessor::transform(txXPathNode& aSource,
|
|||
|
||||
/**
|
||||
* Parses the XML Stylesheet PIs associated with the
|
||||
* given XML document. If a stylesheet PIs is found with type="text/xsl"
|
||||
* or type="text/xml" the href pseudo attribute value will be appended to
|
||||
* the given href argument. If multiple text/xsl stylesheet PIs
|
||||
* are found, the first one is used.
|
||||
* given XML document. If a stylesheet PIs is found with type="text/xsl",
|
||||
* type="text/xml" or type="application/xml" the href pseudo attribute
|
||||
* value will be appended to the given href argument. If multiple XSLT
|
||||
* stylesheet PIs are found, the first one is used.
|
||||
*/
|
||||
void txStandaloneXSLTProcessor::getHrefFromStylesheetPI(Document& xmlDocument,
|
||||
nsAString& href)
|
||||
|
@ -257,7 +257,8 @@ void txStandaloneXSLTProcessor::getHrefFromStylesheetPI(Document& xmlDocument,
|
|||
tmpHref.Truncate();
|
||||
parseStylesheetPI(data, type, tmpHref);
|
||||
if (type.EqualsLiteral("text/xsl") ||
|
||||
type.EqualsLiteral("text/xml")) {
|
||||
type.EqualsLiteral("text/xml") ||
|
||||
type.EqualsLiteral("application/xml")) {
|
||||
href = tmpHref;
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче