Bug 1377845 - Fix wrong tooltip position when menulist and button appear in grid r=jaws
authorRicky Chien <ricky060709@gmail.com>
Tue, 04 Jul 2017 16:14:51 +0800
changeset 607436 46a7174bf44d59532d823c989f6125bd9f8ff106
parent 607435 8d9bbed8efd0ca2cad6dc01532c94a3cdd389477
child 607437 a92d98b28d1056f1217ff8429e38f8f2617c9dec
push id67985
push userbmo:emilio+bugs@crisal.io
push dateWed, 12 Jul 2017 08:36:44 +0000
reviewersjaws
bugs1377845
milestone56.0a1
Bug 1377845 - Fix wrong tooltip position when menulist and button appear in grid r=jaws MozReview-Commit-ID: EpsfX27WTrx
browser/components/preferences/fonts.xul
browser/components/preferences/languages.xul
browser/themes/shared/incontentprefs/preferences.inc.css
--- a/browser/components/preferences/fonts.xul
+++ b/browser/components/preferences/fonts.xul
@@ -92,55 +92,61 @@
           <row>
             <separator class="thin"/>
           </row>
 
           <row align="center">
             <hbox align="center" pack="end">
               <label accesskey="&proportional.accesskey;" control="defaultFontType">&proportional.label;</label>
             </hbox>
-            <menulist id="defaultFontType" flex="1" style="width: 0px;">
-              <menupopup>
-                <menuitem value="serif" label="&useDefaultFontSerif.label;"/>
-                <menuitem value="sans-serif" label="&useDefaultFontSansSerif.label;"/>
-              </menupopup>
-            </menulist>
+            <!-- This <hbox> is needed to position search tooltips correctly. -->
+            <hbox>
+              <menulist id="defaultFontType" flex="1" style="width: 0px;">
+                <menupopup>
+                  <menuitem value="serif" label="&useDefaultFontSerif.label;"/>
+                  <menuitem value="sans-serif" label="&useDefaultFontSansSerif.label;"/>
+                </menupopup>
+              </menulist>
+            </hbox>
             <hbox align="center" pack="end">
               <label accesskey="&sizeProportional.accesskey;"
                      control="sizeVar">&size.label;</label>
             </hbox>
-            <menulist id="sizeVar" delayprefsave="true">
-              <menupopup>
-                <menuitem value="9" label="9"/>
-                <menuitem value="10" label="10"/>
-                <menuitem value="11" label="11"/>
-                <menuitem value="12" label="12"/>
-                <menuitem value="13" label="13"/>
-                <menuitem value="14" label="14"/>
-                <menuitem value="15" label="15"/>
-                <menuitem value="16" label="16"/>
-                <menuitem value="17" label="17"/>
-                <menuitem value="18" label="18"/>
-                <menuitem value="20" label="20"/>
-                <menuitem value="22" label="22"/>
-                <menuitem value="24" label="24"/>
-                <menuitem value="26" label="26"/>
-                <menuitem value="28" label="28"/>
-                <menuitem value="30" label="30"/>
-                <menuitem value="32" label="32"/>
-                <menuitem value="34" label="34"/>
-                <menuitem value="36" label="36"/>
-                <menuitem value="40" label="40"/>
-                <menuitem value="44" label="44"/>
-                <menuitem value="48" label="48"/>
-                <menuitem value="56" label="56"/>
-                <menuitem value="64" label="64"/>
-                <menuitem value="72" label="72"/>
-              </menupopup>
-            </menulist>
+            <!-- This <hbox> is needed to position search tooltips correctly. -->
+            <hbox>
+              <menulist id="sizeVar" delayprefsave="true">
+                <menupopup>
+                  <menuitem value="9" label="9"/>
+                  <menuitem value="10" label="10"/>
+                  <menuitem value="11" label="11"/>
+                  <menuitem value="12" label="12"/>
+                  <menuitem value="13" label="13"/>
+                  <menuitem value="14" label="14"/>
+                  <menuitem value="15" label="15"/>
+                  <menuitem value="16" label="16"/>
+                  <menuitem value="17" label="17"/>
+                  <menuitem value="18" label="18"/>
+                  <menuitem value="20" label="20"/>
+                  <menuitem value="22" label="22"/>
+                  <menuitem value="24" label="24"/>
+                  <menuitem value="26" label="26"/>
+                  <menuitem value="28" label="28"/>
+                  <menuitem value="30" label="30"/>
+                  <menuitem value="32" label="32"/>
+                  <menuitem value="34" label="34"/>
+                  <menuitem value="36" label="36"/>
+                  <menuitem value="40" label="40"/>
+                  <menuitem value="44" label="44"/>
+                  <menuitem value="48" label="48"/>
+                  <menuitem value="56" label="56"/>
+                  <menuitem value="64" label="64"/>
+                  <menuitem value="72" label="72"/>
+                </menupopup>
+              </menulist>
+            </hbox>
           </row>
           <row align="center">
             <hbox align="center" pack="end">
               <label accesskey="&serif.accesskey;" control="serif">&serif.label;</label>
             </hbox>
             <hbox>
               <menulist id="serif" flex="1" style="width: 0px;" delayprefsave="true"
                         onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
--- a/browser/components/preferences/languages.xul
+++ b/browser/components/preferences/languages.xul
@@ -78,21 +78,24 @@
                     accesskey="&languages.customize.deleteButton.accesskey;"
                     preference="pref.browser.language.disable_button.remove"/>
           </vbox>
         </row>
         <row>
           <separator class="thin"/>
         </row>
         <row>
-          <menulist id="availableLanguages" oncommand="gLanguagesDialog.onAvailableLanguageSelect();"
-                    label="&languages.customize.selectLanguage.label;"
-                    label2="&languages.customize.selectLanguage.label;">
-            <menupopup id="availableLanguagesPopup"/>
-          </menulist>
+          <!-- This <vbox> is needed to position search tooltips correctly. -->
+          <vbox>
+            <menulist id="availableLanguages" oncommand="gLanguagesDialog.onAvailableLanguageSelect();"
+                      label="&languages.customize.selectLanguage.label;"
+                      label2="&languages.customize.selectLanguage.label;">
+              <menupopup id="availableLanguagesPopup"/>
+            </menulist>
+          </vbox>
           <button id="addButton" oncommand="gLanguagesDialog.addLanguage();" disabled="true"
                   label="&languages.customize.addButton.label;"
                   accesskey="&languages.customize.addButton.accesskey;"/>
         </row>
       </rows>
     </grid>
     <separator/>
     <separator/>
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -668,8 +668,12 @@ menulist[indicator=true] > menupopup men
   width: 8px;
   height: 10px;
   margin: 0;
 }
 
 menulist[indicator=true] > menupopup menuitem[indicator=true]:not([image]) > .menu-iconic-left > .menu-iconic-icon:-moz-locale-dir(rtl) {
   transform: scaleX(-1);
 }
+
+.menu-iconic-highlightable-text {
+  margin: 0; /* Align with the margin of xul:label.menu-iconic-text */
+}