if a view does not have a clip, then we set the clip in the rc to

the bounds for the view.
This commit is contained in:
michaelp 1998-04-28 00:42:58 +00:00
parent 731ca7f0a1
commit 7721fe5215

View File

@ -323,12 +323,13 @@ nsIWidget * nsView :: GetWidget()
void nsView :: Paint(nsIRenderingContext& rc, const nsRect& rect)
{
rc.PushState();
rc.Translate(mBounds.x, mBounds.y);
if (mClipRect.IsEmpty() == PR_FALSE)
{
nsRect trect;
rc.Translate(mBounds.x, mBounds.y);
trect.x = mClipRect.x;
trect.y = mClipRect.y;
trect.width = (mClipRect.width - mClipRect.x) + 1;
@ -336,6 +337,11 @@ void nsView :: Paint(nsIRenderingContext& rc, const nsRect& rect)
rc.SetClipRect(trect, PR_TRUE);
}
else
{
rc.SetClipRect(mBounds, PR_TRUE);
rc.Translate(mBounds.x, mBounds.y);
}
if (nsnull != mFrame)
{