mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1448760 - Don't try to center window after load when the size mode is not normal. r=bz
MozReview-Commit-ID: Ainh34XuvFg --HG-- extra : rebase_source : 034caa4085d7fd3836d3f3bf5fb3c7390dc785a7
This commit is contained in:
parent
e1ecaae43e
commit
2b0ae4061a
@ -96,6 +96,13 @@
|
||||
await changeSizeMode(() => win.maximize());
|
||||
win.close();
|
||||
|
||||
// Open a new window again with centerscreen which shouldn't revert
|
||||
// the persisted sizemode.
|
||||
win = openWindow("centerscreen");
|
||||
await SimpleTest.promiseFocus(win);
|
||||
checkWindow("when open with centerscreen", win, win.STATE_MAXIMIZED);
|
||||
win.close();
|
||||
|
||||
// Linux doesn't seem to persist sizemode across opening window
|
||||
// with specified size, so mark it expected fail for now.
|
||||
let todo = navigator.platform.includes('Linux');
|
||||
|
@ -2357,7 +2357,8 @@ nsXULWindow::SizeShell()
|
||||
|
||||
LoadMiscPersistentAttributesFromXUL();
|
||||
|
||||
if (mChromeLoaded && mCenterAfterLoad && !positionSet) {
|
||||
if (mChromeLoaded && mCenterAfterLoad && !positionSet &&
|
||||
mWindow->SizeMode() == nsSizeMode_Normal) {
|
||||
Center(parentWindow, parentWindow ? false : true, false);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user