fixed bug where changing view opacity or transparency would not trigger

a refresh.


git-svn-id: svn://10.0.0.236/trunk@13948 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
michaelp%netscape.com 1998-11-03 01:49:30 +00:00
parent f797cb3825
commit d8f18ce4e4

View File

@ -1068,18 +1068,34 @@ NS_IMETHODIMP nsViewManager :: GetViewClipAbsolute(nsIView *aView, nsRect *rect,
NS_IMETHODIMP nsViewManager :: SetViewContentTransparency(nsIView *aView, PRBool aTransparent)
{
UpdateTransCnt(aView, nsnull);
aView->SetContentTransparency(aTransparent);
UpdateTransCnt(nsnull, aView);
PRBool trans;
aView->HasTransparency(trans);
if (trans != aTransparent)
{
UpdateTransCnt(aView, nsnull);
aView->SetContentTransparency(aTransparent);
UpdateTransCnt(nsnull, aView);
UpdateView(aView, nsnull, 0);
}
return NS_OK;
}
NS_IMETHODIMP nsViewManager :: SetViewOpacity(nsIView *aView, float aOpacity)
{
UpdateTransCnt(aView, nsnull);
aView->SetOpacity(aOpacity);
UpdateTransCnt(nsnull, aView);
float opacity;
aView->GetOpacity(opacity);
if (opacity != aOpacity)
{
UpdateTransCnt(aView, nsnull);
aView->SetOpacity(aOpacity);
UpdateTransCnt(nsnull, aView);
UpdateView(aView, nsnull, 0);
}
return NS_OK;
}