mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
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:
parent
ce84061033
commit
1fef229506
@ -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)))
|
||||
|
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user