зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1540305 - Notify content of position change. r=geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D25488 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4a9effbea9
Коммит
3c8da1a00e
|
@ -1668,6 +1668,7 @@ void nsWindow::Resize(double aX, double aY, double aWidth, double aHeight,
|
|||
ALOG("nsWindow[%p]::Resize [%f %f %f %f] (repaint %d)", (void*)this, aX, aY,
|
||||
aWidth, aHeight, aRepaint);
|
||||
|
||||
bool needPositionDispatch = aX != mBounds.x || aY != mBounds.y;
|
||||
bool needSizeDispatch = aWidth != mBounds.width || aHeight != mBounds.height;
|
||||
|
||||
mBounds.x = NSToIntRound(aX);
|
||||
|
@ -1679,6 +1680,10 @@ void nsWindow::Resize(double aX, double aY, double aWidth, double aHeight,
|
|||
OnSizeChanged(gfx::IntSize::Truncate(aWidth, aHeight));
|
||||
}
|
||||
|
||||
if (needPositionDispatch) {
|
||||
NotifyWindowMoved(mBounds.x, mBounds.y);
|
||||
}
|
||||
|
||||
// Should we skip honoring aRepaint here?
|
||||
if (aRepaint && FindTopLevel() == nsWindow::TopWindow()) RedrawAll();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче