Bug 233441. Make nsViewManager always have a root view, you can't change it. r+sr=dbaron

git-svn-id: svn://10.0.0.236/trunk@156019 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu
2004-05-06 03:17:14 +00:00
parent b9b2c207c9
commit 1eea5c536c
35 changed files with 114 additions and 414 deletions

View File

@@ -1584,11 +1584,7 @@ nsDocShell::SetZoom(float zoom)
if (scrollableView)
scrollableView->ComputeScrollOffsets();
// get the root view
nsIView *rootView = nsnull; // views are not ref counted
vm->GetRootView(rootView);
if (rootView)
vm->UpdateView(rootView, 0);
vm->UpdateView(vm->RootView(), 0);
return NS_OK;
}
@@ -3269,13 +3265,8 @@ nsDocShell::GetVisibility(PRBool * aVisibility)
nsIViewManager* vm = presShell->GetViewManager();
NS_ENSURE_TRUE(vm, NS_ERROR_FAILURE);
// get the root view
nsIView *view = nsnull; // views are not ref counted
NS_ENSURE_SUCCESS(vm->GetRootView(view), NS_ERROR_FAILURE);
NS_ENSURE_TRUE(view, NS_ERROR_FAILURE);
// if our root view is hidden, we are not visible
if (view->GetVisibility() == nsViewVisibility_kHide) {
if (vm->RootView()->GetVisibility() == nsViewVisibility_kHide) {
*aVisibility = PR_FALSE;
return NS_OK;
}