bug 485305: stop resizing the window to apply the titlebarcolor when a persona is selected on Firefox 3.5, since 3.5 applies the titlebarcolor automatically
authorMyk Melez <myk@mozilla.org>
Thu, 28 May 2009 13:18:47 -0700
changeset 971 ce6559554cf7ef6bcd01359a8415047905ba6fe9
parent 970 a713991a65578781981e70cafac90e9ba5a78a37
child 972 05a40fcd85d68bf8eb4ad17a03e28444b86a9385
push id606
push usermyk@mozilla.com
push dateThu, 28 May 2009 20:20:20 +0000
bugs485305
bug 485305: stop resizing the window to apply the titlebarcolor when a persona is selected on Firefox 3.5, since 3.5 applies the titlebarcolor automatically
client/chrome/content/personas.js
--- a/client/chrome/content/personas.js
+++ b/client/chrome/content/personas.js
@@ -418,19 +418,21 @@ let PersonaController = {
       document.documentElement.setAttribute("activetitlebarcolor", active);
       changed = true;
     }
     if (inactive != this._header.getAttribute("inactivetitlebarcolor")) {
       document.documentElement.setAttribute("inactivetitlebarcolor", inactive);
       changed = true;
     }
 
-    if (changed) {
-      // FIXME: Incredibly gross hack in order to force a window redraw
-      // event that ensures that the titlebar color change is applied.
+    if (changed && PersonaService.appInfo.platformVersion.indexOf("1.9.0") == 0) {
+      // FIXME: Incredibly gross hack in order to force a window redraw event
+      // that ensures that the titlebar color change is applied. We only have to
+      // do this for Firefox 3.0 (Gecko 1.9.0) because bug 485451 on the problem
+      // has been fixed for Firefox 3.5 (Gecko 1.9.1).
       //
       // This will unmaximize a maximized window on Windows and Linux,
       // but we only do this on Mac (which is the only place
       // the "titlebarcolor" attribute has any effect anyway at the moment),
       // so that's ok for now.
       //
       // This will unminimize a minimized window on Mac, so we can't do it
       // if the window is minimized.