Bug 1536028 - remove grid usage from preferences' cookies.xul and display.inc.xul. r=mkmelin
authorKhushil Mistry <khushil324@gmail.com>
Sat, 23 Mar 2019 09:11:29 +0100
changeset 26149 f9d9f70bc490
parent 26148 3496ec1acebe
child 26150 fc8015e62158
push id15696
push usermozilla@jorgk.com
push dateSat, 23 Mar 2019 08:18:55 +0000
treeherdercomm-central@34cf7d8564ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1536028
Bug 1536028 - remove grid usage from preferences' cookies.xul and display.inc.xul. r=mkmelin
mail/components/preferences/cookies.js
mail/components/preferences/cookies.xul
mail/components/preferences/display.inc.xul
--- a/mail/components/preferences/cookies.js
+++ b/mail/components/preferences/cookies.js
@@ -21,17 +21,18 @@ var gCookiesWindow = {
     this._bundle = document.getElementById("bundlePreferences");
     this._tree = document.getElementById("cookiesList");
 
     this._populateList(true);
 
     document.getElementById("filter").focus();
 
     if (!Services.prefs.getBoolPref("privacy.userContext.enabled")) {
-      document.getElementById("userContextRow").hidden = true;
+      document.getElementById("userContext").hidden = true;
+      document.getElementById("userContextLabel").hidden = true;
     }
   },
 
   uninit() {
     Services.obs.removeObserver(this, "cookie-changed");
     Services.obs.removeObserver(this, "perm-changed");
   },
 
--- a/mail/components/preferences/cookies.xul
+++ b/mail/components/preferences/cookies.xul
@@ -48,53 +48,49 @@
                  persist="width" onclick="gCookiesWindow.sort('rawHost');" />
         <splitter class="tree-splitter"/>
         <treecol id="nameCol" label="&cookiename.label;" flex="1"
                  persist="width"
                  onclick="gCookiesWindow.sort('name');"/>
       </treecols>
       <treechildren id="cookiesChildren"/>
     </tree>
-    <hbox id="cookieInfoBox">
-      <grid flex="1" id="cookieInfoGrid">
-        <columns>
-          <column/>
-          <column flex="1"/>
-        </columns>
-        <rows>
-          <row align="center">
-            <hbox pack="end"><label id="nameLabel" control="name" value="&props.name.label;"/></hbox>
-            <textbox id="name" readonly="true" class="plain"/>
-          </row>
-          <row align="center">
-            <hbox pack="end"><label id="valueLabel" control="value" value="&props.value.label;"/></hbox>
-            <textbox id="value" readonly="true" class="plain"/>
-          </row>
-          <row align="center">
-            <hbox pack="end"><label id="isDomain" control="host" value="&props.domain.label;"/></hbox>
-            <textbox id="host" readonly="true" class="plain"/>
-          </row>
-          <row align="center">
-            <hbox pack="end"><label id="pathLabel" control="path" value="&props.path.label;"/></hbox>
-            <textbox id="path" readonly="true" class="plain"/>
-          </row>
-          <row align="center">
-            <hbox pack="end"><label id="isSecureLabel" control="isSecure" value="&props.secure.label;"/></hbox>
-            <textbox id="isSecure" readonly="true" class="plain"/>
-          </row>
-          <row align="center">
-            <hbox pack="end"><label id="expiresLabel" control="expires" value="&props.expires.label;"/></hbox>
-            <textbox id="expires" readonly="true" class="plain"/>
-          </row>
-          <row align="center" id="userContextRow">
-            <hbox pack="end"><label id="userContextLabel" control="userContext" value="&props.container.label;"/></hbox>
-            <textbox id="userContext" readonly="true" class="plain"/>
-          </row>
-        </rows>
-      </grid>
+    <hbox id="cookieInfoSettings" flex="1">
+      <vbox>
+        <vbox flex="1" pack="center" align="end">
+          <label id="nameLabel" control="name" value="&props.name.label;"/>
+        </vbox>
+        <vbox flex="1" pack="center" align="end">
+          <label id="valueLabel" control="value" value="&props.value.label;"/>
+        </vbox>
+        <vbox flex="1" pack="center" align="end">
+          <label id="isDomain" control="host" value="&props.domain.label;"/>
+        </vbox>
+        <vbox flex="1" pack="center" align="end">
+          <label id="pathLabel" control="path" value="&props.path.label;"/>
+        </vbox>
+        <vbox flex="1" pack="center" align="end">
+          <label id="isSecureLabel" control="isSecure" value="&props.secure.label;"/>
+        </vbox>
+        <vbox flex="1" pack="center" align="end">
+          <label id="expiresLabel" control="expires" value="&props.expires.label;"/>
+        </vbox>
+        <vbox id="userContextLabel" flex="1" pack="center" align="end">
+          <label control="userContext" value="&props.container.label;"/>
+        </vbox>
+      </vbox>
+      <vbox flex="1">
+        <textbox id="name" readonly="true" class="plain"/>
+        <textbox id="value" readonly="true" class="plain"/>
+        <textbox id="host" readonly="true" class="plain"/>
+        <textbox id="path" readonly="true" class="plain"/>
+        <textbox id="isSecure" readonly="true" class="plain"/>
+        <textbox id="expires" readonly="true" class="plain"/>
+        <textbox id="userContext" readonly="true" class="plain"/>
+      </vbox>
     </hbox>
   </vbox>
   <hbox align="end">
     <hbox class="actionButtons" flex="1">
       <button id="removeSelectedCookies" disabled="true" icon="remove"
               label="&button.removecookie.label;" accesskey="&button.removecookie.accesskey;"
               oncommand="gCookiesWindow.deleteCookie();"/>
       <button id="removeAllCookies" disabled="true" icon="clear"
--- a/mail/components/preferences/display.inc.xul
+++ b/mail/components/preferences/display.inc.xul
@@ -16,77 +16,69 @@
 
       <tabpanels id="displayPrefsPanels" flex="1">
 
         <tabpanel orient="vertical">
           <!-- Fonts and Colors -->
           <groupbox id="fontsGroup">
             <label><html:h2>&fontsAndColors1.label;</html:h2></label>
 
-            <grid id="fontsGrid">
-              <columns>
-                <column flex="1"/>
-                <column/>
-              </columns>
-              <rows id="fontsRows">
-                <row id="fontRow">
-                  <hbox align="center">
-                    <label accesskey="&defaultFont.accesskey;"
-                           control="defaultFont">&defaultFont.label;</label>
-                    <menulist id="defaultFont" flex="1" sizetopopup="pref" crop="center"
-                              onsyncfrompreference="return gDisplayPane.readFontSelection()">
-                      <menupopup/>
-                    </menulist>
-                    <label accesskey="&defaultSize.accesskey;"
-                           control="defaultFontSize">&defaultSize.label;</label>
-                    <menulist id="defaultFontSize">
-                      <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>
+            <hbox id="fontSettings" flex="1">
+              <vbox id="fontRow" flex="1">
+                <hbox align="center">
+                  <label accesskey="&defaultFont.accesskey;" control="defaultFont">&defaultFont.label;</label>
+                  <menulist id="defaultFont" flex="1" sizetopopup="pref" crop="center"
+                            onsyncfrompreference="return gDisplayPane.readFontSelection()">
+                    <menupopup crop="center"/>
+                  </menulist>
+                  <label accesskey="&defaultSize.accesskey;" control="defaultFontSize">&defaultSize.label;</label>
+                  <menulist id="defaultFontSize" flex="1">
+                    <menupopup crop="center">
+                      <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>
+              </vbox>
+              <vbox id="colorsRow">
+                <hbox>
                   <spacer style="width: 15px"/>
-                  <button id="advancedFonts" label="&fontOptions.label;"
-                          icon="select-font" accesskey="&fontOptions.accesskey;"
-                          oncommand="gDisplayPane.configureFonts();"/>
-                </row>
-                <row id="colorsRow">
-                  <hbox/>
+                  <button id="advancedFonts" flex="1" label="&fontOptions.label;" icon="select-font"
+                          accesskey="&fontOptions.accesskey;" oncommand="gDisplayPane.configureFonts();"/>
+                </hbox>
+                <hbox>
                   <spacer style="width: 15px"/>
-                  <button id="colors" icon="select-color"
-                          label="&colorButton.label;"
-                          accesskey="&colorButton.accesskey;"
-                          oncommand="gDisplayPane.configureColors();"/>
-                </row>
-              </rows>
-            </grid>
+                  <button id="colors" flex="1" icon="select-color" label="&colorButton.label;"
+                          accesskey="&colorButton.accesskey;" oncommand="gDisplayPane.configureColors();"/>
+                </hbox>
+              </vbox>
+            </hbox>
           </groupbox>
 
           <groupbox>
             <label><html:h2>&displayWidth.label;</html:h2></label>
             <hbox>
               <checkbox id="displayGlyph"
                         label="&convertEmoticons.label;"
                         preference="mail.display_glyph"