Bug 1363960 - Fix RWD issues for Preferences r?jaws draft
authorRicky Chien <ricky060709@gmail.com>
Mon, 17 Jul 2017 17:39:10 +0800
changeset 610273 f2b11f5608ce48061e08882e6573bad9cd694551
parent 610234 5e73b9798464c3f7106f0161dc9a49b234f42f9c
child 637799 37335c722fc7947d6302941bcf7d320aff6a40ad
push id68824
push userbmo:rchien@mozilla.com
push dateTue, 18 Jul 2017 02:29:51 +0000
reviewersjaws
bugs1363960
milestone56.0a1
Bug 1363960 - Fix RWD issues for Preferences r?jaws MozReview-Commit-ID: DBDXvX5qR79
browser/components/preferences/in-content-new/advanced.xul
browser/components/preferences/in-content-new/main.xul
browser/components/preferences/in-content-new/privacy.js
browser/components/preferences/in-content-new/privacy.xul
--- a/browser/components/preferences/in-content-new/advanced.xul
+++ b/browser/components/preferences/in-content-new/advanced.xul
@@ -109,17 +109,19 @@
       </hbox>
       <hbox id="downloading" align="center">
         <image class="update-throbber"/><label>&update.downloading.start;</label><label id="downloadStatus"/><label>&update.downloading.end;</label>
       </hbox>
       <hbox id="applying" align="center">
         <image class="update-throbber"/><label>&update.applying;</label>
       </hbox>
       <hbox id="downloadFailed" align="center">
-        <label>&update.failed.start;</label><label id="failedLink" class="text-link">&update.failed.linkText;</label><label>&update.failed.end;</label>
+        <description flex="1">
+          <label>&update.failed.start;</label><label id="failedLink" class="text-link">&update.failed.linkText;</label><label>&update.failed.end;</label>
+        </description>
         <spacer flex="1"/>
         <button label="&update.checkForUpdatesButton.label;"
                 accesskey="&update.checkForUpdatesButton.accesskey;"
                 oncommand="gAppUpdater.checkForUpdates();"/>
       </hbox>
       <hbox id="adminDisabled" align="center">
         <label>&update.adminDisabled;</label>
         <spacer flex="1"/>
@@ -137,24 +139,28 @@
       <hbox id="otherInstanceHandlingUpdates" align="center">
         <label>&update.otherInstanceHandlingUpdates;</label>
         <spacer flex="1"/>
         <button label="&update.checkForUpdatesButton.label;"
                 accesskey="&update.checkForUpdatesButton.accesskey;"
                 disabled="true"/>
       </hbox>
       <hbox id="manualUpdate" align="center">
-        <label>&update.manual.start;</label><label id="manualLink" class="text-link"/><label>&update.manual.end;</label>
+        <description flex="1">
+          <label>&update.manual.start;</label><label id="manualLink" class="text-link"/><label>&update.manual.end;</label>
+        </description>
         <spacer flex="1"/>
         <button label="&update.checkForUpdatesButton.label;"
                 accesskey="&update.checkForUpdatesButton.accesskey;"
                 disabled="true"/>
       </hbox>
       <hbox id="unsupportedSystem" align="center">
-        <label>&update.unsupported.start;</label><label id="unsupportedLink" class="text-link">&update.unsupported.linkText;</label><label>&update.unsupported.end;</label>
+        <description flex="1">
+          <label>&update.unsupported.start;</label><label id="unsupportedLink" class="text-link">&update.unsupported.linkText;</label><label>&update.unsupported.end;</label>
+        </description>
         <spacer flex="1"/>
         <button label="&update.checkForUpdatesButton.label;"
                 accesskey="&update.checkForUpdatesButton.accesskey;"
                 disabled="true"/>
       </hbox>
       <hbox id="restarting" align="center">
         <image class="update-throbber"/><label>&update.restarting;</label>
         <spacer flex="1"/>
--- a/browser/components/preferences/in-content-new/main.xul
+++ b/browser/components/preferences/in-content-new/main.xul
@@ -485,19 +485,19 @@
 
 
 <!-- Fonts and Colors -->
 <groupbox id="fontsGroup" data-category="paneGeneral" hidden="true">
   <caption><label>&fontsAndColors.label;</label></caption>
 
   <vbox>
     <hbox id="fontSettings">
-      <hbox align="center">
+      <hbox align="center" flex="1">
         <label control="defaultFont" accesskey="&defaultFont2.accesskey;">&defaultFont2.label;</label>
-        <menulist id="defaultFont" delayprefsave="true" onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
+        <menulist id="defaultFont" flex="1" delayprefsave="true" onsyncfrompreference="return FontBuilder.readFontSelection(this);"/>
         <label id="defaultFontSizeLabel" control="defaultFontSize" accesskey="&defaultSize2.accesskey;">&defaultSize2.label;</label>
         <menulist id="defaultFontSize" 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"/>
--- a/browser/components/preferences/in-content-new/privacy.js
+++ b/browser/components/preferences/in-content-new/privacy.js
@@ -1308,26 +1308,26 @@ var gPrivacyPane = {
     this.observer = {
       onNetworkCacheDiskConsumption(consumption) {
         var size = DownloadUtils.convertByteUnits(consumption);
         // The XBL binding for the string bundle may have been destroyed if
         // the page was closed before this callback was executed.
         if (!prefStrBundle.getFormattedString) {
           return;
         }
-        actualSizeLabel.value = prefStrBundle.getFormattedString("actualDiskCacheSize", size);
+        actualSizeLabel.textContent = prefStrBundle.getFormattedString("actualDiskCacheSize", size);
       },
 
       QueryInterface: XPCOMUtils.generateQI([
         Components.interfaces.nsICacheStorageConsumptionObserver,
         Components.interfaces.nsISupportsWeakReference
       ])
     };
 
-    actualSizeLabel.value = prefStrBundle.getString("actualDiskCacheSizeCalculated");
+    actualSizeLabel.textContent = prefStrBundle.getString("actualDiskCacheSizeCalculated");
 
     try {
       var cacheService =
         Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
                   .getService(Components.interfaces.nsICacheStorageService);
       cacheService.asyncGetDiskConsumption(this.observer);
     } catch (e) {}
   },
--- a/browser/components/preferences/in-content-new/privacy.xul
+++ b/browser/components/preferences/in-content-new/privacy.xul
@@ -478,21 +478,21 @@
   <caption><label>&notificationsPolicy.label;</label></caption>
   <grid>
     <columns>
       <column flex="1"/>
       <column/>
     </columns>
     <rows>
       <row id="notificationsPolicyRow" align="center">
-        <hbox flex="1">
+        <description flex="1">
           <label id="notificationsPolicy">&notificationsPolicyDesc3.label;</label>
           <label id="notificationsPolicyLearnMore"
                  class="learnMore text-link">&notificationsPolicyLearnMore.label;</label>
-        </hbox>
+        </description>
         <hbox pack="end">
           <button id="notificationsPolicyButton"
                   class="accessory-button"
                   label="&notificationsPolicyButton.label;"
                   accesskey="&notificationsPolicyButton.accesskey;"
                   searchkeywords="&removepermission.label;
                                   &removeallpermissions.label;
                                   &button.cancel.label;
@@ -693,17 +693,17 @@
   </hbox>
 </groupbox>
 
 <!-- Cache -->
 <groupbox id="cacheGroup" data-category="panePrivacy" hidden="true">
   <caption><label>&httpCache.label;</label></caption>
 
   <hbox align="center">
-    <label id="actualDiskCacheSize" flex="1"/>
+    <description id="actualDiskCacheSize" flex="1"/>
     <button id="clearCacheButton"
             class="accessory-button"
             icon="clear"
             label="&clearCacheNow.label;" accesskey="&clearCacheNow.accesskey;"/>
   </hbox>
   <checkbox preference="browser.cache.disk.smart_size.enabled"
             id="allowSmartSize"
             onsyncfrompreference="return gPrivacyPane.readSmartSizeEnabled();"
@@ -759,35 +759,38 @@
     </vbox>
   </hbox>
 </groupbox>
 
 <!-- Site Data -->
 <groupbox id="siteDataGroup" hidden="true" data-category="panePrivacy" data-hidden-from-search="true">
   <caption><label>&siteData.label;</label></caption>
 
-  <hbox align="baseline">
-    <label id="totalSiteDataSize"></label>
-    <label id="siteDataLearnMoreLink" class="learnMore text-link" value="&siteDataLearnMoreLink.label;"></label>
-    <spacer flex="1" />
-    <button id="clearSiteDataButton"
-            class="accessory-button"
-            icon="clear"
-            label="&clearSiteData.label;" accesskey="&clearSiteData.accesskey;"/>
+  <hbox>
+    <vbox flex="1">
+      <description flex="1">
+        <label id="totalSiteDataSize"></label>
+        <label id="siteDataLearnMoreLink" class="learnMore text-link" value="&siteDataLearnMoreLink.label;"></label>
+      </description>
+    </vbox>
+    <vbox>
+      <button id="siteDataSettings"
+              class="accessory-button"
+              label="&siteDataSettings.label;"
+              accesskey="&siteDataSettings.accesskey;"
+              searchkeywords="&window.title;
+                              &hostCol.label;
+                              &statusCol.label;
+                              &usageCol.label;"/>
+      <button id="clearSiteDataButton"
+              class="accessory-button"
+              icon="clear"
+              label="&clearSiteData.label;" accesskey="&clearSiteData.accesskey;"/>
+    </vbox>
   </hbox>
-  <vbox align="end">
-    <button id="siteDataSettings"
-            class="accessory-button"
-            label="&siteDataSettings.label;"
-            accesskey="&siteDataSettings.accesskey;"
-            searchkeywords="&window.title;
-                            &hostCol.label;
-                            &statusCol.label;
-                            &usageCol.label;"/>
-  </vbox>
 </groupbox>
 
 <!-- Data Choices -->
 #ifdef MOZ_DATA_REPORTING
 
 <groupbox id="telemetryGroup" data-category="panePrivacy" data-subcategory="reports" hidden="true">
 <caption><label>&reports.label;</label></caption>
 #ifndef MOZ_TELEMETRY_REPORTING
@@ -811,21 +814,21 @@
     </hbox>
     <description id="telemetryDataDesc"
                  class="indent">&telemetryDesc.label;</description>
   </vbox>
 </groupbox>
 
 #ifdef MOZ_CRASHREPORTER
 <groupbox id="crashReporterGroup" data-category="panePrivacy" data-subcategory="reports" hidden="true">
-  <hbox align="center">
+  <description>
     <checkbox id="automaticallySubmitCrashesBox"
               preference="browser.crashReports.unsubmittedCheck.autoSubmit"
               label="&alwaysSubmitCrashReports.label;"
               accesskey="&alwaysSubmitCrashReports.accesskey;"/>
     <label id="crashReporterLearnMore"
            class="learnMore text-link">&crashReporterLearnMore.label;</label>
-  </hbox>
+  </description>
   <description class="indent">&crashReporterDesc2.label;</description>
 </groupbox>
 
 #endif
 #endif