зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1259492 - Ensure window position is constrained to the screen after it has been sized properly in nsXULWindow::OnChromeLoaded. r=emk
This commit is contained in:
Родитель
8da73c781f
Коммит
dfa53d5003
|
@ -1080,16 +1080,20 @@ void nsXULWindow::OnChromeLoaded()
|
|||
int32_t width = 0, height = 0;
|
||||
if (NS_SUCCEEDED(cv->GetContentSize(&width, &height))) {
|
||||
treeOwner->SizeShellTo(docShellAsItem, width, height);
|
||||
// Now that we know the window's final size, we can re-do its
|
||||
// positioning so that it is properly constrained to the screen.
|
||||
if (positionSet) {
|
||||
LoadPositionFromXUL(width, height);
|
||||
}
|
||||
// Update specified size for the final LoadPositionFromXUL call.
|
||||
specWidth = width;
|
||||
specHeight = height;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now that we have set the window's final size, we can re-do its
|
||||
// positioning so that it is properly constrained to the screen.
|
||||
if (positionSet) {
|
||||
LoadPositionFromXUL(specWidth, specHeight);
|
||||
}
|
||||
|
||||
LoadMiscPersistentAttributesFromXUL();
|
||||
|
||||
if (mCenterAfterLoad && !positionSet) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче