зеркало из https://github.com/mozilla/gecko-dev.git
forgot to check this in for viewsource; bug13536; r=harish
This commit is contained in:
Родитель
16b4f0d5e6
Коммит
5024910c2a
|
@ -54,14 +54,14 @@ extern nsresult NS_NewDocumentViewer(nsIDocumentViewer** aResult);
|
||||||
static char* gHTMLTypes[] = {
|
static char* gHTMLTypes[] = {
|
||||||
"text/html",
|
"text/html",
|
||||||
"application/rtf",
|
"application/rtf",
|
||||||
"text/plain",
|
|
||||||
"text/css",
|
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
static char* gXMLTypes[] = {
|
static char* gXMLTypes[] = {
|
||||||
"text/xml",
|
"text/xml",
|
||||||
"application/xml",
|
"application/xml",
|
||||||
|
"text/plain",
|
||||||
|
"text/css",
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -232,13 +232,8 @@ nsLayoutDLF::CreateInstance(const char *aCommand,
|
||||||
{
|
{
|
||||||
nsresult rv = NS_ERROR_FAILURE;
|
nsresult rv = NS_ERROR_FAILURE;
|
||||||
|
|
||||||
// XXX vile hack
|
|
||||||
if(0==PL_strcmp(aCommand,"view-source")) {
|
if(0==PL_strcmp(aCommand,"view-source")) {
|
||||||
if((0==PL_strcmp(gXMLTypes[0],aContentType)) ||
|
aContentType=gXMLTypes[0];
|
||||||
(0==PL_strcmp(gRDFTypes[0],aContentType)) ||
|
|
||||||
(0==PL_strcmp(gRDFTypes[1],aContentType))) {
|
|
||||||
aContentType=gHTMLTypes[0];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try html
|
// Try html
|
||||||
|
|
Загрузка…
Ссылка в новой задаче