bug 162239 - POST document could not inherit charset from previous page if the previous charset is from autodetection. Add PrevDocCharset field and use it for POST document charset resolution. Patch by shanjian, r=ftang, darin, sr=jst.

git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@128001 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%netscape.com
2002-08-23 22:57:13 +00:00
parent 6a22790358
commit 0d1df09d12
8 changed files with 116 additions and 24 deletions

View File

@@ -4232,6 +4232,7 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
nsXPIDLString forceCharset;
nsXPIDLString hintCharset;
PRInt32 hintCharsetSource;
nsXPIDLString prevDocCharset;
nsCOMPtr<nsIMarkupDocumentViewer>
newMUDV(do_QueryInterface(aNewViewer));
@@ -4249,6 +4250,9 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
NS_ENSURE_SUCCESS(oldMUDV->
GetHintCharacterSetSource(&hintCharsetSource),
NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(oldMUDV->
GetPrevDocCharacterSet(getter_Copies(prevDocCharset)),
NS_ERROR_FAILURE);
// set the old state onto the new content viewer
NS_ENSURE_SUCCESS(newMUDV->SetDefaultCharacterSet(defaultCharset),
@@ -4260,6 +4264,8 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
NS_ENSURE_SUCCESS(newMUDV->
SetHintCharacterSetSource(hintCharsetSource),
NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(newMUDV->SetPrevDocCharacterSet(prevDocCharset),
NS_ERROR_FAILURE);
}
}