mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Fixed not bother repositioning when coordinates don't change
This commit is contained in:
parent
e85ace8aa5
commit
0c0ce42a16
@ -1882,12 +1882,12 @@ NS_IMETHODIMP nsViewManager :: MoveViewTo(nsIView *aView, nscoord aX, nscoord aY
|
|||||||
nscoord oldY;
|
nscoord oldY;
|
||||||
|
|
||||||
aView->GetPosition(&oldX, &oldY);
|
aView->GetPosition(&oldX, &oldY);
|
||||||
aView->SetPosition(aX, aY);
|
|
||||||
|
|
||||||
// only do damage control if the view is visible
|
// only do damage control if the view is visible
|
||||||
|
|
||||||
if ((aX != oldX) || (aY != oldY))
|
if ((aX != oldX) || (aY != oldY))
|
||||||
{
|
{
|
||||||
|
aView->SetPosition(aX, aY);
|
||||||
nsViewVisibility visibility;
|
nsViewVisibility visibility;
|
||||||
aView->GetVisibility(visibility);
|
aView->GetVisibility(visibility);
|
||||||
if (visibility != nsViewVisibility_kHide)
|
if (visibility != nsViewVisibility_kHide)
|
||||||
|
Loading…
Reference in New Issue
Block a user