Back out changeset ad7f9821597e (bug 573973, calling SetDrawsInTitlebar on nsXULWindow load) because it caused bug 576394.
authorMarkus Stange <mstange@themasta.com>
Fri, 02 Jul 2010 08:22:54 +0200
changeset 47122 751b3e72a7eb76f78246d0806714ac8c4e7f8b7d
parent 46986 ad7f9821597e090f5bb1e57e9eb1686a24479cfa
child 47123 c173731c9d90c7e97c47f0a824b53f7f115b9e83
push id14239
push usermstange@themasta.com
push dateFri, 02 Jul 2010 06:23:47 +0000
treeherdermozilla-central@c173731c9d90 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs573973, 576394
milestone2.0b2pre
backs outad7f9821597e090f5bb1e57e9eb1686a24479cfa
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
Back out changeset ad7f9821597e (bug 573973, calling SetDrawsInTitlebar on nsXULWindow load) because it caused bug 576394.
widget/tests/window_bug522217.xul
xpfe/appshell/src/nsXULWindow.cpp
--- a/widget/tests/window_bug522217.xul
+++ b/widget/tests/window_bug522217.xul
@@ -44,27 +44,18 @@ function start() {
     is(window.outerHeight, oldOuterHeight, "wrong outerHeight after fullscreen mode");
     is(window.innerWidth, oldOuterWidth, "wrong innerWidth after fullscreen mode");
     is(window.innerHeight, oldOuterHeight, "wrong innerHeight after fullscreen mode");
     document.documentElement.removeAttribute("drawintitlebar");
     is(window.outerWidth, oldOuterWidth, "wrong outerWidth after removing drawintitlebar");
     is(window.outerHeight, oldOuterHeight, "wrong outerHeight after removing drawintitlebar");
     is(window.innerWidth, oldInnerWidth, "wrong innerWidth after removing drawintitlebar");
     is(window.innerHeight, oldInnerHeight, "wrong innerHeight after removing drawintitlebar");
-
-    // Test whether having drawintitlebar also works when it's set on the window
-    // from the beginning.
-    var win = open('data:application/vnd.mozilla.xul+xml,<?xml version="1.0"?><?xml-stylesheet href="chrome://global/skin" type="text/css"?><window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" drawintitlebar="true" width="200" height="200"/>', '_blank', 'chrome');
-    win.onfocus = function () {
-      is(win.innerWidth, win.outerWidth, "if drawintitlebar is set, innerWidth and outerWidth should be the same");
-      is(win.innerHeight, win.outerHeight, "if drawintitlebar is set, innerHeight and outerHeight should be the same");
-      win.close();
-      window.opener.wrappedJSObject.SimpleTest.finish();
-      window.close();
-    }
+    window.opener.wrappedJSObject.SimpleTest.finish();
+    window.close();
   }
 }
 
 
 ]]>
 </script>
 
 </window>
--- a/xpfe/appshell/src/nsXULWindow.cpp
+++ b/xpfe/appshell/src/nsXULWindow.cpp
@@ -1405,22 +1405,16 @@ void nsXULWindow::SyncAttributesToWidget
   }
   mWindow->SetIcon(attr);
 
   // "toggletoolbar" attribute
   rv = windowElement->GetAttribute(NS_LITERAL_STRING("toggletoolbar"), attr);
   if (NS_SUCCEEDED(rv)) {
     mWindow->SetShowsToolbarButton(attr.LowerCaseEqualsLiteral("true"));
   }
-
-  // "drawintitlebar" attribute
-  rv = windowElement->GetAttribute(NS_LITERAL_STRING("drawintitlebar"), attr);
-  if (NS_SUCCEEDED(rv)) {
-    mWindow->SetDrawsInTitlebar(attr.EqualsLiteral("true"));
-  }
 }
 
 NS_IMETHODIMP nsXULWindow::SavePersistentAttributes()
 {
   // can happen when the persistence timer fires at an inopportune time
   // during window shutdown
   if (!mDocShell)
     return NS_ERROR_FAILURE;