зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1443392 - Send resize event when FRAMECHANGED flag is set even if the window isn't resized. r=jimm
MozReview-Commit-ID: 9wpiFr9Tw9c --HG-- extra : rebase_source : e1f97df2afd9c76fba87684752662a78e9b851c9
This commit is contained in:
Родитель
ea34c24a48
Коммит
547748db6b
|
@ -6790,11 +6790,24 @@ void nsWindow::OnWindowPosChanged(WINDOWPOS* wp)
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Recalculate the width and height based on the client area for gecko events.
|
||||
LayoutDeviceIntSize clientSize(newWidth, newHeight);
|
||||
// Notify the widget listener for size change of client area for gecko
|
||||
// events. This needs to be done when either window size is changed,
|
||||
// or window frame is changed. They may not happen together.
|
||||
// However, we don't invoke that for popup when window frame changes,
|
||||
// because popups may trigger frame change before size change via
|
||||
// {Set,Clear}ThemeRegion they invoke in Resize. That would make the
|
||||
// code below call OnResize with a wrong client size first, which can
|
||||
// lead to flickerling for some popups.
|
||||
if (!(wp->flags & SWP_NOSIZE) ||
|
||||
((wp->flags & SWP_FRAMECHANGED) && !IsPopup())) {
|
||||
RECT r;
|
||||
LayoutDeviceIntSize clientSize;
|
||||
if (::GetClientRect(mWnd, &r)) {
|
||||
clientSize = WinUtils::ToIntRect(r).Size();
|
||||
} else {
|
||||
clientSize = mBounds.Size();
|
||||
}
|
||||
// Send a gecko resize event
|
||||
OnResize(clientSize);
|
||||
|
|
Загрузка…
Ссылка в новой задаче