Backed out changeset bf13c2253055
authorDão Gottwald <dao@mozilla.com>
Fri, 23 Mar 2012 16:58:27 +0100
changeset 93433 344e07332d529765281e50126fcb4708dc860ec3
parent 93203 bf13c225305523d1bb30d429809a0883527bd93a
child 93434 c1bfb6203345cc358327d959e2aeed534e0129d2
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone14.0a1
backs outbf13c225305523d1bb30d429809a0883527bd93a
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset bf13c2253055
dom/tests/mochitest/chrome/sizemode_attribute.xul
xpfe/appshell/src/nsXULWindow.cpp
--- a/dom/tests/mochitest/chrome/sizemode_attribute.xul
+++ b/dom/tests/mochitest/chrome/sizemode_attribute.xul
@@ -5,17 +5,16 @@
   Test for fullscreen sizemode in chrome
   -->
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         persist="sizemode"
         sizemode="normal"
         onload="nextStep()">
 
 <script type="text/javascript;version=1.8">
-let testNum = 0;
 let tests = [
   function test1() {
     checkAndContinue("normal");
   },
 
   function test2() {
     listen("fullscreen", function() checkAndContinue("fullscreen"));
     window.fullScreen = true;
@@ -47,17 +46,16 @@ let tests = [
   },
 
   function test8() {
     window.opener.wrappedJSObject.done();
   }
 ];
 
 function nextStep() {
-  testNum++;
   tests.shift()();
 }
 
 function listen(event, fn) {
   window.addEventListener(event, function listener() {
     window.removeEventListener(event, listener, false);
     fn();
   }, false);
@@ -67,26 +65,19 @@ function checkAndContinue(sizemode) {
 
   let windowStates = {
     "fullscreen": window.STATE_FULLSCREEN,
     "normal": window.STATE_NORMAL,
     "maximized": window.STATE_MAXIMIZED
   };
 
   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);
 }
 
 let is = window.opener.wrappedJSObject.is;
 
 </script>
 
--- a/xpfe/appshell/src/nsXULWindow.cpp
+++ b/xpfe/appshell/src/nsXULWindow.cpp
@@ -1508,19 +1508,21 @@ NS_IMETHODIMP nsXULWindow::SavePersisten
       sizeString.AssignWithConversion(sizeBuf);
       docShellElement->SetAttribute(HEIGHT_ATTRIBUTE, sizeString);
       if (ownerXULDoc)
         ownerXULDoc->Persist(windowElementId, HEIGHT_ATTRIBUTE);
     }
   }
 
   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);
       if (ownerXULDoc && persistString.Find("sizemode") >= 0)
         ownerXULDoc->Persist(windowElementId, MODE_ATTRIBUTE);
     }
     if (persistString.Find("zlevel") >= 0) {
       PRUint32 zLevel;