Bug 637864 - Give nsIViewManager::GetRootView a sane signature; r=bz
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user