Bug 1446264 part 2 - Ignore XUL position when sizemode is maximized. r?bz
MozReview-Commit-ID: 2NTZBeehXam
--- a/xpfe/appshell/nsXULWindow.cpp
+++ b/xpfe/appshell/nsXULWindow.cpp
@@ -1359,20 +1359,21 @@ bool nsXULWindow::LoadMiscPersistentAttr
}
if (sizeMode == nsSizeMode_Fullscreen) {
nsCOMPtr<mozIDOMWindowProxy> ourWindow;
GetWindowDOMWindow(getter_AddRefs(ourWindow));
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);
}
gotState = true;
// zlevel
windowElement->GetAttribute(ZLEVEL_ATTRIBUTE, stateString);
if (!stateString.IsEmpty()) {