activating charset override. bug #7886, r=ftang, a=bobj
git-svn-id: svn://10.0.0.236/trunk@62105 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
7c438bb6ab
commit
1d485f061e
@ -631,6 +631,9 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
PRUnichar* forceCharsetFromWebShell = NULL;
|
||||
if (muCV) {
|
||||
rv = muCV->GetForceCharacterSet(&forceCharsetFromWebShell);
|
||||
if ((NULL != forceCharsetFromWebShell) && (0 != forceCharsetFromWebShell[0])) {
|
||||
muCV->SetForceCharacterSet(NULL);
|
||||
}
|
||||
}
|
||||
if(NS_SUCCEEDED(rv) && (nsnull != forceCharsetFromWebShell))
|
||||
{
|
||||
|
||||
@ -631,6 +631,9 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
PRUnichar* forceCharsetFromWebShell = NULL;
|
||||
if (muCV) {
|
||||
rv = muCV->GetForceCharacterSet(&forceCharsetFromWebShell);
|
||||
if ((NULL != forceCharsetFromWebShell) && (0 != forceCharsetFromWebShell[0])) {
|
||||
muCV->SetForceCharacterSet(NULL);
|
||||
}
|
||||
}
|
||||
if(NS_SUCCEEDED(rv) && (nsnull != forceCharsetFromWebShell))
|
||||
{
|
||||
|
||||
@ -271,6 +271,7 @@ nsBrowserAppCore::SetDocumentCharset(const PRUnichar *aCharset)
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> markupCV = do_QueryInterface(childCV);
|
||||
if (markupCV) {
|
||||
NS_ENSURE_SUCCESS(markupCV->SetDefaultCharacterSet(aCharset), NS_ERROR_FAILURE);
|
||||
NS_ENSURE_SUCCESS(markupCV->SetForceCharacterSet(aCharset), NS_ERROR_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user