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

@@ -1419,9 +1419,7 @@ DocumentViewerImpl::Open(nsISupports *aState, nsISHEntry *aSHEntry)
nsIViewManager *vm = GetViewManager();
NS_ABORT_IF_FALSE(vm, "no view manager");
nsIView *v;
nsresult rv = vm->GetRootView(v);
NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv), "failed in getting the root view");
nsIView* v = vm->GetRootView();
NS_ABORT_IF_FALSE(v, "no root view");
NS_ABORT_IF_FALSE(mParentWidget, "no mParentWidget to set");
v->AttachToTopLevelWidget(mParentWidget);
@@ -1566,8 +1564,7 @@ DocumentViewerImpl::Destroy()
if (mPresShell) {
nsIViewManager *vm = mPresShell->GetViewManager();
if (vm) {
nsIView *rootView = nsnull;
vm->GetRootView(rootView);
nsIView *rootView = vm->GetRootView();
if (rootView) {
// The invalidate that removing this view causes is dropped because
@@ -2363,8 +2360,7 @@ void
DocumentViewerImpl::DetachFromTopLevelWidget()
{
if (mViewManager) {
nsIView* oldView = nsnull;
mViewManager->GetRootView(oldView);
nsIView* oldView = mViewManager->GetRootView();
if (oldView && oldView->IsAttachedToTopLevel()) {
oldView->DetachFromTopLevelWidget();
}