Bug 637864 - Give nsIViewManager::GetRootView a sane signature; r=bz

This commit is contained in:
Ms2ger
2011-03-29 22:24:54 -04:00
parent 75436b2651
commit cc1d294433
19 changed files with 59 additions and 91 deletions

View File

@@ -4758,8 +4758,7 @@ nsDocShell::GetVisibility(PRBool * aVisibility)
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);
nsIView *view = vm->GetRootView(); // views are not ref counted
NS_ENSURE_TRUE(view, NS_ERROR_FAILURE);
// if our root view is hidden, we are not visible
@@ -7047,8 +7046,7 @@ nsDocShell::RestoreFromHistory()
if (oldPresShell) {
nsIViewManager *vm = oldPresShell->GetViewManager();
if (vm) {
nsIView *oldRootView = nsnull;
vm->GetRootView(oldRootView);
nsIView *oldRootView = vm->GetRootView();
if (oldRootView) {
rootViewSibling = oldRootView->GetNextSibling();
@@ -7255,9 +7253,7 @@ nsDocShell::RestoreFromHistory()
nsDocShell::GetPresShell(getter_AddRefs(shell));
nsIViewManager *newVM = shell ? shell->GetViewManager() : nsnull;
nsIView *newRootView = nsnull;
if (newVM)
newVM->GetRootView(newRootView);
nsIView *newRootView = newVM ? newVM->GetRootView() : nsnull;
// Insert the new root view at the correct location in the view tree.
if (rootViewParent) {
@@ -7350,7 +7346,7 @@ nsDocShell::RestoreFromHistory()
// When we insert the root view above the resulting invalidate is
// dropped because painting is suppressed in the presshell until we
// call Thaw. So we issue the invalidate here.
newVM->GetRootView(newRootView);
newRootView = newVM->GetRootView();
if (newRootView) {
newVM->UpdateView(newRootView, NS_VMREFRESH_NO_SYNC);
}