Bug 32372 should be possible to completely disable CSS p=fantasai@inkedblade.net r=me (xpfe) r/sr=dbaron

git-svn-id: svn://10.0.0.236/trunk@160395 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
neil%parkwaycc.co.uk
2004-08-05 11:38:42 +00:00
parent 89993ef05b
commit 0bbab9b402
25 changed files with 250 additions and 14 deletions

View File

@@ -2125,7 +2125,7 @@ nsDocShell::AddChild(nsIDocShellTreeItem * aChild)
if (!childAsDocShell)
return NS_OK;
// charset and zoom will be inherited in SetupNewViewer()
// charset, style-disabling, and zoom will be inherited in SetupNewViewer()
// Now take this document's charset and set the parentCharset field of the
// child's DocumentCharsetInfo to it. We'll later use that field, in the
@@ -4726,6 +4726,7 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
PRInt32 hintCharsetSource;
nsCAutoString prevDocCharset;
float textZoom;
PRBool styleDisabled;
// |newMUDV| also serves as a flag to set the data from the above vars
nsCOMPtr<nsIMarkupDocumentViewer> newMUDV;
@@ -4764,6 +4765,9 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
NS_ENSURE_SUCCESS(oldMUDV->
GetTextZoom(&textZoom),
NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(oldMUDV->
GetAuthorStyleDisabled(&styleDisabled),
NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(oldMUDV->
GetPrevDocCharacterSet(prevDocCharset),
NS_ERROR_FAILURE);
@@ -4894,6 +4898,8 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(newMUDV->SetTextZoom(textZoom),
NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(newMUDV->SetAuthorStyleDisabled(styleDisabled),
NS_ERROR_FAILURE);
}
// End copying block (Don't mess with the old content/document viewer