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