mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 03:49:42 +00:00
Changed MoveViewTo() so it doesn't do any painting unless the
origin actually changes
This commit is contained in:
parent
804683723f
commit
448077e579
@ -685,15 +685,18 @@ void nsViewManager :: MoveViewTo(nsIView *aView, nscoord aX, nscoord aY)
|
||||
|
||||
// only do damage control if the view is visible
|
||||
|
||||
if (nsViewVisibility_kHide != aView->GetVisibility())
|
||||
if ((aX != oldX) || (aY != oldY))
|
||||
{
|
||||
nsRect bounds;
|
||||
aView->GetBounds(bounds);
|
||||
nsRect oldArea(oldX, oldY, bounds.width, bounds.height);
|
||||
nsIView* parent = aView->GetParent(); // no addref
|
||||
UpdateView(parent, oldArea, 0);
|
||||
nsRect newArea(aX, aY, bounds.width, bounds.height);
|
||||
UpdateView(parent, newArea, 0);
|
||||
if (nsViewVisibility_kHide != aView->GetVisibility())
|
||||
{
|
||||
nsRect bounds;
|
||||
aView->GetBounds(bounds);
|
||||
nsRect oldArea(oldX, oldY, bounds.width, bounds.height);
|
||||
nsIView* parent = aView->GetParent(); // no addref
|
||||
UpdateView(parent, oldArea, 0);
|
||||
nsRect newArea(aX, aY, bounds.width, bounds.height);
|
||||
UpdateView(parent, newArea, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user