merge backout

This commit is contained in:
Dão Gottwald 2012-03-23 16:58:48 +01:00
commit 3bef02aec5
2 changed files with 6 additions and 13 deletions

View File

@ -10,7 +10,6 @@
onload="nextStep()">
<script type="text/javascript;version=1.8">
let testNum = 0;
let tests = [
function test1() {
checkAndContinue("normal");
@ -52,7 +51,6 @@ let tests = [
];
function nextStep() {
testNum++;
tests.shift()();
}
@ -72,16 +70,9 @@ function checkAndContinue(sizemode) {
};
setTimeout(function() {
// The sizemode attribute is wrong when the window is in fullscreen.
// cf. bug 714911
if (sizemode != "fullscreen") {
is(window.document.documentElement.getAttribute("sizemode"), sizemode,
"Test " + testNum + ": sizemode attribute should match actual window state");
}
is(window.fullScreen, sizemode == "fullscreen",
"Test " + testNum + ": window.fullScreen should match actual window state");
is(window.windowState, windowStates[sizemode],
"Test " + testNum + ": window.sizeMode should match actual window state");
is(window.document.documentElement.getAttribute("sizemode"), sizemode, "sizemode attribute should match actual window state");
is(window.fullScreen, sizemode == "fullscreen", "window.fullScreen should match actual window state");
is(window.windowState, windowStates[sizemode], "window.sizeMode should match actual window state");
nextStep();
}, 0);
}

View File

@ -1519,9 +1519,11 @@ NS_IMETHODIMP nsXULWindow::SavePersistentAttributes()
}
if (mPersistentAttributesDirty & PAD_MISC) {
if (sizeMode != nsSizeMode_Minimized && sizeMode != nsSizeMode_Fullscreen) {
if (sizeMode != nsSizeMode_Minimized) {
if (sizeMode == nsSizeMode_Maximized)
sizeString.Assign(SIZEMODE_MAXIMIZED);
else if (sizeMode == nsSizeMode_Fullscreen)
sizeString.Assign(SIZEMODE_FULLSCREEN);
else
sizeString.Assign(SIZEMODE_NORMAL);
docShellElement->SetAttribute(MODE_ATTRIBUTE, sizeString);