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:
Eitan Isaacson 2019-04-02 17:15:39 +00:00
Родитель 4a9effbea9
Коммит 3c8da1a00e
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -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();
}