Bug 1446264 part 2 - Ignore XUL position when sizemode is maximized. r=bz

MozReview-Commit-ID: 2NTZBeehXam

--HG--
extra : rebase_source : 0359b7d6237e7cb70e785141d7914dce10ef2c47
This commit is contained in:
Xidorn Quan 2018-03-21 16:02:05 +11:00
parent 5083a5d2e4
commit 4ac1f60c1e

View File

@ -1364,10 +1364,11 @@ bool nsXULWindow::LoadMiscPersistentAttributesFromXUL()
auto* piWindow = nsPIDOMWindowOuter::From(ourWindow);
piWindow->SetFullScreen(true);
} else {
// For maximized windows, ignore the XUL size attributes, as setting the
// size would set the window back to the normal sizemode.
// For maximized windows, ignore the XUL size and position attributes,
// as setting them would set the window back to normal sizemode.
if (sizeMode == nsSizeMode_Maximized) {
mIgnoreXULSize = true;
mIgnoreXULPosition = true;
}
mWindow->SetSizeMode(sizeMode);
}