when hiding a view, invalidate the parent view since the hidden view will reject the invalidate
git-svn-id: svn://10.0.0.236/trunk@49284 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1921,11 +1921,22 @@ NS_IMETHODIMP nsViewManager :: SetViewClip(nsIView *aView, nsRect *aRect)
|
||||
|
||||
NS_IMETHODIMP nsViewManager :: SetViewVisibility(nsIView *aView, nsViewVisibility aVisible)
|
||||
{
|
||||
nsViewVisibility isNowVisible;
|
||||
aView->GetVisibility(isNowVisible);
|
||||
if ( aVisible != isNowVisible ) {
|
||||
nsViewVisibility oldVisible;
|
||||
aView->GetVisibility(oldVisible);
|
||||
if (aVisible != oldVisible) {
|
||||
aView->SetVisibility(aVisible);
|
||||
UpdateView(aView, nsnull, NS_VMREFRESH_NO_SYNC);
|
||||
if (nsViewVisibility_kHide == aVisible) {
|
||||
nsIView* parentView = nsnull;
|
||||
aView->GetParent(parentView);
|
||||
if (parentView) {
|
||||
nsRect bounds;
|
||||
aView->GetBounds(bounds);
|
||||
UpdateView(parentView, bounds, NS_VMREFRESH_NO_SYNC);
|
||||
}
|
||||
}
|
||||
else {
|
||||
UpdateView(aView, nsnull, NS_VMREFRESH_NO_SYNC);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user