Bug 633599 - App menu should be hidden instead of collapsed during startup [r=mbrubeck]
authorVivien Nicolas <21@vingtetun.org>
Tue, 15 Feb 2011 19:26:51 +0100
changeset 67393 43a92edbbe1c2d7241cd41392409dca3d9f05e68
parent 67392 e2d9f1ccb1483f0f0de1acb95e33eea60b2be334
child 67394 02dd468500046fc42e675b1aca1acdf52c16eb5a
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs633599
Bug 633599 - App menu should be hidden instead of collapsed during startup [r=mbrubeck]
mobile/chrome/content/AppMenu.js
mobile/chrome/content/browser.xul
mobile/themes/core/browser.css
--- a/mobile/chrome/content/AppMenu.js
+++ b/mobile/chrome/content/AppMenu.js
@@ -3,33 +3,33 @@ var AppMenu = {
     delete this.panel;
     return this.panel = document.getElementById("appmenu");
   },
 
   show: function show() {
     if (BrowserUI.activePanel || BrowserUI.isPanelVisible())
       return;
     this.panel.setAttribute("count", this.panel.childNodes.length);
-    this.panel.collapsed = false;
+    this.panel.hidden = false;
 
     addEventListener("keypress", this, true);
 
     BrowserUI.lockToolbar();
     BrowserUI.pushPopup(this, [this.panel, Elements.toolbarContainer]);
   },
 
   hide: function hide() {
-    this.panel.collapsed = true;
+    this.panel.hidden = true;
 
     removeEventListener("keypress", this, true);
 
     BrowserUI.unlockToolbar();
     BrowserUI.popPopup(this);
   },
 
   toggle: function toggle() {
-    this.panel.collapsed ? this.show() : this.hide();
+    this.panel.hidden ? this.show() : this.hide();
   },
 
   handleEvent: function handleEvent(aEvent) {
     this.hide();
   }
 };
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -661,17 +661,17 @@
           onclick="AlertsHelper.click(event);">
       <image id="alerts-image"/>
       <vbox flex="1">
         <label id="alerts-title" value=""/>
         <description id="alerts-text" flex="1"/>
       </vbox>
     </hbox>
 
-    <hbox id="appmenu" bottom="0" collapsed="true" align="stretch" oncommand="AppMenu.hide();">
+    <hbox id="appmenu" bottom="0" hidden="true" align="stretch" oncommand="AppMenu.hide();">
       <toolbarbutton class="appmenu-button"
         label="&appMenu.siteOptions;"
         image="chrome://browser/skin/images/appmenu-site-hdpi.png"
         oncommand="getIdentityHandler().show(); event.stopPropagation();"/>
       <toolbarbutton class="appmenu-button"
         label="&prefsHeader.label;"
         image="chrome://browser/skin/images/appmenu-preferences-hdpi.png"
         oncommand="BrowserUI.showPanel('prefs-container');"/>
--- a/mobile/themes/core/browser.css
+++ b/mobile/themes/core/browser.css
@@ -1578,19 +1578,19 @@ pageaction:not([image]) > hbox >.pageact
 }
 
 #appmenu > .appmenu-button .toolbarbutton-icon {
   margin-top: @margin_normal@ !important;
   margin-bottom: @margin_small@ !important;
 }
 
 @media (@orientation@: portrait) {
-  #appmenu[count="4"],
-  #appmenu[count="5"],
-  #appmenu[count="6"] {
+  #appmenu:not([hidden])[count="4"],
+  #appmenu:not([hidden])[count="5"],
+  #appmenu:not([hidden])[count="6"] {
     height: @appmenu_portrait_height@;
     display: inline-block;
   }
 
   #appmenu[count="4"] > .appmenu-button,
   #appmenu[count="5"] > .appmenu-button {
     width: 50%;
   }