Correctly set visibility of view on DidReflow for cases when our CSS visibility style has changed from visible (windows part) bug 129306 r=av sr=attinasi

This commit is contained in:
peterlubczynski%netscape.com 2002-04-13 02:43:58 +00:00
parent ce84061033
commit 1fef229506
2 changed files with 14 additions and 4 deletions

View File

@ -1428,18 +1428,23 @@ nsObjectFrame::DidReflow(nsIPresContext* aPresContext,
// The view is created hidden; once we have reflowed it and it has been
// positioned then we show it.
if ((aStatus != NS_FRAME_REFLOW_FINISHED) || IsHidden())
if (aStatus != NS_FRAME_REFLOW_FINISHED)
return rv;
PRBool bHidden = IsHidden();
nsIView* view = nsnull;
GetView(aPresContext, &view);
if (view) {
nsCOMPtr<nsIViewManager> vm;
view->GetViewManager(*getter_AddRefs(vm));
if (vm)
vm->SetViewVisibility(view, nsViewVisibility_kShow);
vm->SetViewVisibility(view, bHidden ? nsViewVisibility_kHide : nsViewVisibility_kShow);
}
if (bHidden)
return rv;
nsPluginWindow *window;
if (!mInstanceOwner || NS_FAILED(mInstanceOwner->GetWindow(window)))

View File

@ -1428,18 +1428,23 @@ nsObjectFrame::DidReflow(nsIPresContext* aPresContext,
// The view is created hidden; once we have reflowed it and it has been
// positioned then we show it.
if ((aStatus != NS_FRAME_REFLOW_FINISHED) || IsHidden())
if (aStatus != NS_FRAME_REFLOW_FINISHED)
return rv;
PRBool bHidden = IsHidden();
nsIView* view = nsnull;
GetView(aPresContext, &view);
if (view) {
nsCOMPtr<nsIViewManager> vm;
view->GetViewManager(*getter_AddRefs(vm));
if (vm)
vm->SetViewVisibility(view, nsViewVisibility_kShow);
vm->SetViewVisibility(view, bHidden ? nsViewVisibility_kHide : nsViewVisibility_kShow);
}
if (bHidden)
return rv;
nsPluginWindow *window;
if (!mInstanceOwner || NS_FAILED(mInstanceOwner->GetWindow(window)))