Bug 556656 - Blank form helper pops-up for un-populated menulists [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Mon, 12 Apr 2010 10:44:15 -0400
changeset 66126 7fa58ac246f582d06969dcb7f07ef6daefc506c4
parent 66125 120b43328847c4b2a8f69e630b88ad56604ad774
child 66127 a446ac7c375dceb61cd05b51dedc8e47fd0cba1b
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)
reviewersmfinkle
bugs556656
Bug 556656 - Blank form helper pops-up for un-populated menulists [r=mfinkle]
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.xul
mobile/themes/hildon/browser.css
mobile/themes/wince/browser.css
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -1316,17 +1316,17 @@ var FormHelper = {
     document.getElementById("form-helper-next").disabled = this._getNext() ? false : true;
   },
 
   _updateSelect: function(aPreviousElement, aNewElement) {
     let previousIsSelect = this._isValidSelectElement(aPreviousElement);
     let currentIsSelect = this._isValidSelectElement(aNewElement);
 
     if (currentIsSelect && !previousIsSelect) {
-      this._selectContainer.height = window.innerHeight / 1.8;
+      this._selectContainer.style.maxHeight = (window.innerHeight / 1.8) + "px";
 
       let rootNode = this._container;
       rootNode.insertBefore(this._selectContainer, rootNode.lastChild);
 
       SelectHelper.show(aNewElement);
     }
     else if (currentIsSelect && previousIsSelect) {
       SelectHelper.reset();
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -459,22 +459,24 @@
         <radiogroup id="search-buttons" class="toggle-dark" style="-moz-user-focus: ignore;"
                     onclick="BrowserUI.doButtonSearch(event.target);">
         </radiogroup>
       </arrowscrollbox>
     </vbox>
 
     <!-- options dialog for select form field -->
     <vbox id="select-container" hidden="true" pack="center">
-      <vbox id="select-container-inner" class="dialog-dark">
+      <spacer flex="1000"/>
+      <vbox id="select-container-inner" class="dialog-dark" flex="1">
         <scrollbox id="select-list" flex="1" orient="vertical"/>
         <hbox id="select-buttons" pack="center">
           <button id="select-buttons-done" class="button-dark" label="&formHelper.done;" oncommand="SelectHelper.close();"/>
         </hbox>
       </vbox>
+      <spacer flex="1000"/>
     </vbox>
 
     <!-- bookmark window -->
     <vbox id="bookmarklist-container" class="panel-dark" hidden="true">
       <hbox id="bookmarklist-header">
         <description flex="1">&bookmarksHeader.label;</description>
         <toolbarbutton id="tool-bookmarks-manage" class="urlbar-button show-text button-dark" type="checkbox" autocheck="true"
                        label="&bookmarksManage.label;" oncommand="BookmarkList.toggleManage();"/>
--- a/mobile/themes/hildon/browser.css
+++ b/mobile/themes/hildon/browser.css
@@ -1011,17 +1011,25 @@ pageaction .pageaction-desc[value=""] {
 
 /* form popup -------------------------------------------------------------- */
 #form-helper-container > #select-container > #select-container-inner {
   -moz-border-radius-topleft: 8px;
   -moz-border-radius-topright: 8px;
   -moz-border-radius-bottomright: 0;
   -moz-border-radius-bottomleft: 0;
   padding: 8px 4px 8px 4px;
-  -moz-box-flex: 1;
+  -moz-box-flex: 0;
+}
+
+#form-helper-container > #select-container > #select-container-inner > scrollbox {
+  min-height: 70px;
+}
+
+#form-helper-container > #select-container > spacer {
+  display: none;
 }
 
 #form-helper-container > #select-container > #select-container-inner,
 #form-buttons {
   border: 1px solid gray;
   border-bottom: 0;
 }
 
@@ -1088,16 +1096,17 @@ pageaction .pageaction-desc[value=""] {
 
 /* select popup ------------------------------------------------------------ */
 #stack > #select-container {
   padding: 32px;
 }
 
 #select-list {
   border: 1px solid gray;
+  background-color: #fff;
 }
 
 #select-list > option {
   color: #000;
   background-color: #fff;
   padding: 5px;
   border-bottom: 1px solid rgb(207,207,207);
   min-height: 70px; /* row size */
--- a/mobile/themes/wince/browser.css
+++ b/mobile/themes/wince/browser.css
@@ -689,17 +689,25 @@ pageaction .pageaction-desc[value=""] {
 /* form popup -------------------------------------------------------------- */
 #form-helper-container > #select-container > #select-container-inner {
   -moz-border-radius-topleft: 1mm;
   -moz-border-radius-topright: 1mm;
   -moz-border-radius-bottomright: 0;
   -moz-border-radius-bottomleft: 0;
   padding: 0.75mm 0.25mm 0.75mm 0.25mm;
   border-bottom: 0;
-  -moz-box-flex: 1;
+  -moz-box-flex: 0;
+}
+
+#form-helper-container > #select-container > #select-container-inner > scrollbox {
+  min-height: 64px;
+}
+
+#form-helper-container > #select-container > spacer {
+  display: none;
 }
 
 #form-helper-container > #select-container > #select-container-inner,
 #form-buttons {
   border: 0.25mm solid gray;
   border-bottom: 0;
 }
 
@@ -766,16 +774,17 @@ pageaction .pageaction-desc[value=""] {
 
 /* select popup ------------------------------------------------------------ */
 #stack > #select-container {
   padding: 1.5mm;
 }
 
 #select-list {
   border: 0.1mm solid gray;
+  background-color: #fff;
 }
 
 #select-list > option {
   color: #000;
   background-color: #fff;
   padding: 5px;
   border-bottom: 1px solid rgb(207,207,207);
   min-height: 7.2mm; /* row size */