Backing myself out ... IDIOT.

git-svn-id: svn://10.0.0.236/trunk@92932 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu
2001-04-23 18:40:01 +00:00
parent ef97784bf9
commit 67f2bfdbac
6 changed files with 19 additions and 122 deletions

View File

@@ -99,9 +99,6 @@
#include "nsIUBidiUtils.h"
#endif
#include "nsIFrame.h"
#include "nsIStyleContext.h"
static NS_DEFINE_IID(kDeviceContextCID, NS_DEVICE_CONTEXT_CID);
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
static NS_DEFINE_CID(kDocumentCharsetInfoCID, NS_DOCUMENTCHARSETINFO_CID);
@@ -3022,33 +3019,13 @@ NS_IMETHODIMP nsDocShell::SetupNewViewer(nsIContentViewer* aNewViewer)
}
}
nscolor bgcolor = NS_RGBA(0, 0, 0, 0);
PRBool bgSet = PR_FALSE;
if (mContentViewer) {
// Stop any activity that may be happening in the old document before
// releasing it...
if (mContentViewer) {
mContentViewer->Stop();
// Try to extract the default background color from the old
// view manager, so we can use it for the next document.
nsCOMPtr<nsIDocumentViewer> docviewer = do_QueryInterface(mContentViewer);
if (docviewer) {
nsCOMPtr<nsIPresShell> shell;
docviewer->GetPresShell(*getter_AddRefs(shell));
if (shell) {
nsCOMPtr<nsIViewManager> vm;
shell->GetViewManager(getter_AddRefs(vm));
if (vm) {
vm->GetDefaultBackgroundColor(&bgcolor);
bgSet = PR_TRUE;
}
}
}
if (mContentViewer) {
mContentViewer->Destroy();
mContentViewer = nsnull;
}
@@ -3079,26 +3056,6 @@ NS_IMETHODIMP nsDocShell::SetupNewViewer(nsIContentViewer* aNewViewer)
return NS_ERROR_FAILURE;
}
if (bgSet) {
// Stuff the bgcolor from the last view manager into the new
// view manager. This improves page load continuity.
nsCOMPtr<nsIDocumentViewer> docviewer = do_QueryInterface(mContentViewer);
if (docviewer) {
nsCOMPtr<nsIPresShell> shell;
docviewer->GetPresShell(*getter_AddRefs(shell));
if (shell) {
nsCOMPtr<nsIViewManager> vm;
shell->GetViewManager(getter_AddRefs(vm));
if (vm) {
vm->SetDefaultBackgroundColor(bgcolor);
}
}
}
}
#ifdef IBMBIDI
if (newViewer) {
// set the old state onto the new content viewer