Bug 637215 - Regression: menulist popups don't show checkmarks [r=vingtetun]
authorMatt Brubeck <mbrubeck@mozilla.com>
Mon, 28 Feb 2011 06:52:34 -0800
changeset 67438 370cbb90257ef1d36c80d1c8057af834998fda49
parent 67437 50abd10e704f3e5675a23b6bc9785396ab7ea859
child 67439 ab3c98ecbb826158cd1922c9609c1506222da3da
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)
reviewersvingtetun
bugs637215
Bug 637215 - Regression: menulist popups don't show checkmarks [r=vingtetun]
mobile/chrome/content/SelectHelperUI.js
mobile/themes/core/browser.css
mobile/themes/core/forms.css
--- a/mobile/chrome/content/SelectHelperUI.js
+++ b/mobile/chrome/content/SelectHelperUI.js
@@ -44,18 +44,18 @@ var SelectHelperUI = {
       let item = document.createElement("listitem");
 
       item.setAttribute("class", "option-command listitem-iconic prompt-button");
       item.setAttribute("image", "");
       item.setAttribute("flex", "1");
       item.setAttribute("crop", "center");
       item.setAttribute("label", choice.text);
 
-      choice.selected ? item.setAttribute("selected", "true")
-                      : item.removeAttribute("selected");
+      choice.selected ? item.classList.add("selected")
+                      : item.classList.remove("selected");
 
       choice.disabled ? item.setAttribute("disabled", "true")
                       : item.removeAttribute("disabled");
       fragment.appendChild(item);
 
       if (choice.group) {
         item.classList.add("optgroup");
         continue;
@@ -63,17 +63,17 @@ var SelectHelperUI = {
 
       item.optionIndex = choice.optionIndex;
       item.choiceIndex = i;
 
       if (choice.inGroup)
         item.classList.add("in-optgroup");
 
       if (choice.selected) {
-        item.setAttribute("selected", "true");
+        item.classList.add("selected");
         firstSelected = firstSelected || item;
       }
     }
     this._listbox.appendChild(fragment);
     this._container.hidden = false;
   
     BrowserUI.pushPopup(this, this._container);
     this._scrollElementIntoView(firstSelected);
--- a/mobile/themes/core/browser.css
+++ b/mobile/themes/core/browser.css
@@ -445,17 +445,17 @@ toolbarbutton.choice-remotetabs {
   list-style-image: url("chrome://browser/skin/images/preferences-default-hdpi.png");
 }
 
 #tool-console {
   list-style-image: url("chrome://browser/skin/images/console-default-hdpi.png");
 }
 
 /* preferences panel UI -----------------------------------------------------*/
-#menulist-container[for="prefs-homepage-options"] .menulist-command.selected {
+#menulist-container[for="prefs-homepage-options"] .options-command.selected {
   pointer-events: none;
 }
 
 /* bug 597296 - The language.properties file is LTR and never translated */
 #prefs-languages .menulist-label {
   direction: ltr !important;
 }
 
--- a/mobile/themes/core/forms.css
+++ b/mobile/themes/core/forms.css
@@ -204,23 +204,23 @@
   font-size: @font_small@;
   text-align: center;
 }
 
 .options-title[value=""] {
   display: none;
 }
 
-.option-command image {
+.option-command > image {
   width: 30px;
   height: 30px;
   margin: @margin_tiny@;
 }
 
-.option-command[selected="true"] image {
+.option-command.selected {
   list-style-image: url("chrome://browser/skin/images/check-30.png");
 }
 
 .option-command.optgroup {
   font-weight: bold;
   font-style: italic;
 }