Bug 1356020 - Update about:preferences#privacy to fix inconsistencies with strings, move the positioning of the Certificates buttons to the right-side, and update the styling of the Reports section to match the requested text-formatting. r?florian draft
authorJared Wein <jwein@mozilla.com>
Fri, 14 Apr 2017 01:51:32 -0400
changeset 562939 1f799e608651204454ea84cc0e2841c02c75cd6b
parent 562938 70050eb7b755c7189e8c0f3f782f7cba959ed3f4
child 562943 694c3a7f940c3088df4fe61b8dd4e44758851cb2
push id54173
push userbmo:jaws@mozilla.com
push dateFri, 14 Apr 2017 20:03:07 +0000
reviewersflorian
bugs1356020
milestone55.0a1
Bug 1356020 - Update about:preferences#privacy to fix inconsistencies with strings, move the positioning of the Certificates buttons to the right-side, and update the styling of the Reports section to match the requested text-formatting. r?florian MozReview-Commit-ID: DIsr1tfqmcT
browser/components/preferences/in-content/privacy.js
browser/components/preferences/in-content/privacy.xul
browser/locales/en-US/chrome/browser/preferences/advanced.dtd
browser/locales/en-US/chrome/browser/preferences/privacy.dtd
browser/themes/shared/incontentprefs/preferences.inc.css
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -83,16 +83,20 @@ var gPrivacyPane = {
               .getService(Components.interfaces.mozIPlacesAutoComplete);
   },
 
   /**
    * Show the Containers UI depending on the privacy.userContext.ui.enabled pref.
    */
   _initBrowserContainers() {
     if (!Services.prefs.getBoolPref("privacy.userContext.ui.enabled")) {
+      // The browserContainersGroup element has its own internal padding that
+      // is visible even if the browserContainersbox is visible, so hide the whole
+      // groupbox if the feature is disabled to prevent a gap in the preferences.
+      document.getElementById("browserContainersGroup").setAttribute("data-hidden-from-search", "true");
       return;
     }
 
     let link = document.getElementById("browserContainersLearnMore");
     link.href = Services.urlFormatter.formatURLPref("app.support.baseURL") + "containers";
 
     document.getElementById("browserContainersbox").hidden = false;
 
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -182,17 +182,17 @@
 
 
 <!-- History -->
 <groupbox id="historyGroup" data-category="panePrivacy" hidden="true">
   <caption><label>&history.label;</label></caption>
   <hbox align="center">
     <label id="historyModeLabel"
            control="historyMode"
-           accesskey="&historyHeader.pre.accesskey;">&historyHeader.pre.label;
+           accesskey="&historyHeader2.pre.accesskey;">&historyHeader2.pre.label;
     </label>
     <menulist id="historyMode">
       <menupopup>
         <menuitem label="&historyHeader.remember.label;" value="remember"/>
         <menuitem label="&historyHeader.dontremember.label;" value="dontremember"/>
         <menuitem label="&historyHeader.custom.label;" value="custom"/>
       </menupopup>
     </menulist>
@@ -342,37 +342,43 @@
                 preference="pref.privacy.disable_button.view_passwords"/>
       </row>
     </rows>
   </grid>
 </groupbox>
 
 <!-- Tracking -->
 <groupbox id="trackingGroup" data-category="panePrivacy" hidden="true">
+  <caption><label>&trackingProtectionHeader2.label;</label></caption>
   <vbox id="trackingprotectionbox" hidden="true">
     <hbox align="start">
-      <vbox>
-        <caption><label>&trackingProtectionHeader2.label;
+      <vbox flex="1">
+        <description>
+          &trackingProtection.description;
           <label id="trackingProtectionLearnMore" class="learnMore text-link"
                  value="&trackingProtectionLearnMore.label;"/>
-        </label></caption>
-        <radiogroup id="trackingProtectionRadioGroup">
+        </description>
+        <description id="trackingProtectionDesc"
+                     control="trackingProtectionRadioGroup">
+          &trackingProtection.radioGroupLabel;
+        </description>
+        <radiogroup id="trackingProtectionRadioGroup" aria-labelledby="trackingProtectionDesc">
           <radio value="always"
                  label="&trackingProtectionAlways.label;"
                  accesskey="&trackingProtectionAlways.accesskey;"/>
           <radio value="private"
                  label="&trackingProtectionPrivate.label;"
                  accesskey="&trackingProtectionPrivate.accesskey;"/>
           <radio value="never"
                  label="&trackingProtectionNever.label;"
                  accesskey="&trackingProtectionNever.accesskey;"/>
         </radiogroup>
       </vbox>
-      <spacer flex="1" />
-      <vbox>
+      <spacer flex="1"/>
+      <vbox id="trackingProtectionAdvancedSettings">
         <button id="trackingProtectionExceptions"
                 label="&trackingProtectionExceptions.label;"
                 accesskey="&trackingProtectionExceptions.accesskey;"
                 preference="pref.privacy.disable_button.tracking_protection_exceptions"/>
         <button id="changeBlockList"
                 label="&changeBlockList.label;"
                 accesskey="&changeBlockList.accesskey;"
                 preference="pref.privacy.disable_button.change_blocklist"/>
@@ -461,28 +467,28 @@
   </grid>
 </groupbox>
 
 <!-- Location Bar -->
 <groupbox id="locationBarGroup"
           data-category="panePrivacy"
           hidden="true">
   <caption><label>&locationBar.label;</label></caption>
-  <label id="locationBarSuggestionLabel">&locbar.suggest.label;</label>
+  <label id="locationBarSuggestionLabel">&locbar.suggest2.label;</label>
   <checkbox id="historySuggestion" label="&locbar.history.label;"
             accesskey="&locbar.history.accesskey;"
             preference="browser.urlbar.suggest.history"/>
   <checkbox id="bookmarkSuggestion" label="&locbar.bookmarks.label;"
             accesskey="&locbar.bookmarks.accesskey;"
             preference="browser.urlbar.suggest.bookmark"/>
   <checkbox id="openpageSuggestion" label="&locbar.openpage.label;"
             accesskey="&locbar.openpage.accesskey;"
             preference="browser.urlbar.suggest.openpage"/>
   <label class="text-link" onclick="gotoPref('general')">
-    &suggestionSettings.label;
+    &suggestionSettings2.label;
   </label>
 </groupbox>
 
 <!-- addons, forgery (phishing) UI Security -->
 <groupbox id="addonsPhishingGroup" data-category="panePrivacy" hidden="true">
   <caption><label>&security.label;</label></caption>
 
   <hbox id="addonInstallBox">
@@ -509,55 +515,57 @@
       <checkbox id="blockUncommonUnwanted"
                 label="&blockUncommonAndUnwanted.label;"
                 accesskey="&blockUncommonAndUnwanted.accesskey;" />
     </vbox>
   </vbox>
 </groupbox>
 
 <!-- Certificates -->
-<groupbox id="certSelection" align="start" data-category="panePrivacy" hidden="true">
+<groupbox id="certSelection" data-category="panePrivacy" hidden="true">
   <caption><label>&certificateTab.label;</label></caption>
-  <description id="CertSelectionDesc" control="certSelection">&certPersonal.description;</description>
+  <description id="CertSelectionDesc" control="certSelection">&certPersonal2.description;</description>
 
   <!--
     The values on these radio buttons may look like l10n issues, but
     they're not - this preference uses *those strings* as its values.
     I KID YOU NOT.
   -->
   <radiogroup id="certSelection"
               preftype="string"
               preference="security.default_personal_cert"
               aria-labelledby="CertSelectionDesc">
     <radio label="&selectCerts.auto;"
-            accesskey="&selectCerts.auto.accesskey;"
-            value="Select Automatically"/>
+           accesskey="&selectCerts.auto.accesskey;"
+           value="Select Automatically"/>
     <radio label="&selectCerts.ask;"
-            accesskey="&selectCerts.ask.accesskey;"
-            value="Ask Every Time"/>
+           accesskey="&selectCerts.ask.accesskey;"
+           value="Ask Every Time"/>
   </radiogroup>
-  <checkbox id="enableOCSP"
-            label="&enableOCSP.label;"
-            accesskey="&enableOCSP.accesskey;"
-            onsyncfrompreference="return gPrivacyPane.readEnableOCSP();"
-            onsynctopreference="return gPrivacyPane.writeEnableOCSP();"
-            preference="security.OCSP.enabled"/>
-  <separator/>
-  <hbox>
-    <button id="viewCertificatesButton"
-            flex="1"
-            label="&viewCerts.label;"
-            accesskey="&viewCerts.accesskey;"
-            preference="security.disable_button.openCertManager"/>
-    <button id="viewSecurityDevicesButton"
-            flex="1"
-            label="&viewSecurityDevices.label;"
-            accesskey="&viewSecurityDevices.accesskey;"
-            preference="security.disable_button.openDeviceManager"/>
-    <hbox flex="10"/>
+  <hbox align="start">
+    <checkbox id="enableOCSP"
+              label="&enableOCSP.label;"
+              accesskey="&enableOCSP.accesskey;"
+              flex="1"
+              onsyncfrompreference="return gPrivacyPane.readEnableOCSP();"
+              onsynctopreference="return gPrivacyPane.writeEnableOCSP();"
+              preference="security.OCSP.enabled"/>
+    <spacer flex="1"/>
+    <vbox>
+      <button id="viewCertificatesButton"
+              flex="1"
+              label="&viewCerts.label;"
+              accesskey="&viewCerts.accesskey;"
+              preference="security.disable_button.openCertManager"/>
+      <button id="viewSecurityDevicesButton"
+              flex="1"
+              label="&viewSecurityDevices.label;"
+              accesskey="&viewSecurityDevices.accesskey;"
+              preference="security.disable_button.openDeviceManager"/>
+    </vbox>
   </hbox>
 </groupbox>
 
 <!-- DRM Content -->
 <groupbox id="drmGroup" data-category="panePrivacy" hidden="true">
   <caption><label>&drmContent.label;</label></caption>
   <grid id="contentGrid2">
     <columns>
@@ -688,54 +696,45 @@
             accesskey="&siteDataSettings.accesskey;"/>
   </vbox>
 </groupbox>
 
 <!-- Data Choices -->
 #ifdef MOZ_TELEMETRY_REPORTING
 <groupbox id="historyGroup" data-category="panePrivacy" data-subcategory="reports" hidden="true">
 <caption><label>&reports.label;</label></caption>
-  <vbox>
-    <caption>
+  <hbox align="center">
     <checkbox id="submitHealthReportBox" label="&enableHealthReport.label;"
               accesskey="&enableHealthReport.accesskey;"/>
-  </caption>
-    <hbox class="indent" flex="1">
-      <label flex="1">&healthReportDesc.label;</label>
-      <label id="FHRLearnMore" flex="1"
-             class="learnMore text-link">&healthReportLearnMore.label;</label>
+    <label id="FHRLearnMore"
+           class="learnMore text-link">&healthReportLearnMore.label;</label>
+  </hbox>
+  <description class="indent">&healthReportDesc.label;</description>
+  <vbox class="indent">
+    <hbox align="center">
+      <checkbox id="submitTelemetryBox" preference="toolkit.telemetry.enabled"
+                label="&enableTelemetryData.label;"
+                accesskey="&enableTelemetryData.accesskey;"/>
+      <label id="telemetryLearnMore"
+             class="learnMore text-link">&telemetryLearnMore.label;</label>
     </hbox>
-    <hbox class="indent">
-      <groupbox flex="1">
-        <caption>
-          <checkbox id="submitTelemetryBox" preference="toolkit.telemetry.enabled"
-                    label="&enableTelemetryData.label;"
-                    accesskey="&enableTelemetryData.accesskey;"/>
-        </caption>
-        <hbox class="indent" flex="1">
-          <label id="telemetryDataDesc" flex="1">&telemetryDesc.label;</label>
-          <label id="telemetryLearnMore" flex="1"
-                 class="learnMore text-link">&telemetryLearnMore.label;</label>
-        </hbox>
-      </groupbox>
-    </hbox>
+    <description id="telemetryDataDesc"
+                 class="indent">&telemetryDesc.label;</description>
   </vbox>
 </groupbox>
 #endif
 
 #ifdef MOZ_DATA_REPORTING
 #ifdef MOZ_CRASHREPORTER
-<groupbox data-category="panePrivacy" data-subcategory="reports" hidden="true">
-  <caption>
+<groupbox id="crashReporterGroup" data-category="panePrivacy" data-subcategory="reports" hidden="true">
+  <hbox align="center">
     <checkbox id="automaticallySubmitCrashesBox"
               preference="browser.crashReports.unsubmittedCheck.autoSubmit"
               label="&alwaysSubmitCrashReports.label;"
               accesskey="&alwaysSubmitCrashReports.accesskey;"/>
-  </caption>
-  <hbox class="indent" flex="1">
-    <label flex="1">&crashReporterDesc2.label;</label>
-    <label id="crashReporterLearnMore" flex="1"
+    <label id="crashReporterLearnMore"
            class="learnMore text-link">&crashReporterLearnMore.label;</label>
   </hbox>
+  <description class="indent">&crashReporterDesc2.label;</description>
 </groupbox>
 
 #endif
 #endif
--- a/browser/locales/en-US/chrome/browser/preferences/advanced.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/advanced.dtd
@@ -110,17 +110,17 @@
 
 <!ENTITY offlineAppsList2.label          "The following websites are allowed to store data for offline use:">
 <!ENTITY offlineAppsList.height          "7em">
 <!ENTITY offlineAppsListRemove.label     "Remove…">
 <!ENTITY offlineAppsListRemove.accesskey "R">
 <!ENTITY offlineAppRemove.confirm        "Remove offline data">
 
 <!ENTITY certificateTab.label            "Certificates">
-<!ENTITY certPersonal.description        "When a server requests your personal certificate:">
+<!ENTITY certPersonal2.description       "When a server requests your personal certificate">
 <!ENTITY selectCerts.auto                "Select one automatically">
 <!ENTITY selectCerts.auto.accesskey      "S">
 <!ENTITY selectCerts.ask                 "Ask you every time">
 <!ENTITY selectCerts.ask.accesskey       "A">
 <!ENTITY enableOCSP.label                "Query OCSP responder servers to confirm the current validity of certificates">
 <!ENTITY enableOCSP.accesskey            "Q">
 <!ENTITY viewCerts.label                 "View Certificates">
 <!ENTITY viewCerts.accesskey             "C">
--- a/browser/locales/en-US/chrome/browser/preferences/privacy.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/privacy.dtd
@@ -1,13 +1,15 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <!ENTITY  trackingProtectionHeader2.label      "Tracking Protection">
+<!ENTITY  trackingProtection.description       "Tracking is when companies collect information about you to build a profile and display content based on your browsing and personal data.">
+<!ENTITY  trackingProtection.radioGroupLabel   "Block known tracking companies from displaying content">
 <!ENTITY  trackingProtectionAlways.label       "Always">
 <!ENTITY  trackingProtectionAlways.accesskey   "y">
 <!ENTITY  trackingProtectionPrivate.label      "Only in private windows">
 <!ENTITY  trackingProtectionPrivate.accesskey  "l">
 <!ENTITY  trackingProtectionNever.label        "Never">
 <!ENTITY  trackingProtectionNever.accesskey    "n">
 <!ENTITY  trackingProtectionLearnMore.label    "Learn more">
 <!ENTITY  trackingProtectionExceptions.label   "Exceptions…">
@@ -25,28 +27,27 @@
 <!ENTITY  doNotTrack.pre.label          "You can also ">
 <!ENTITY  doNotTrack.settings.label     "manage your Do Not Track settings">
 <!ENTITY  doNotTrack.post.label         ".">
 
 <!ENTITY  history.label                 "History">
 
 <!ENTITY  locationBar.label             "Location Bar">
 
-<!ENTITY  locbar.suggest.label          "When using the location bar, suggest:">
+<!ENTITY  locbar.suggest2.label         "When using the location bar, suggest">
 <!ENTITY  locbar.history.label          "History">
 <!ENTITY  locbar.history.accesskey      "H">
 <!ENTITY  locbar.bookmarks.label        "Bookmarks">
 <!ENTITY  locbar.bookmarks.accesskey    "k">
 <!ENTITY  locbar.openpage.label         "Open tabs">
 <!ENTITY  locbar.openpage.accesskey     "O">
 <!ENTITY  locbar.searches.label         "Related searches from the default search engine">
 <!ENTITY  locbar.searches.accesskey     "d">
 
-<!ENTITY  suggestionSettings.label      "Change preferences for search engine suggestions…">
-<!ENTITY  suggestionSettings.accesskey  "g">
+<!ENTITY  suggestionSettings2.label     "Change preferences for search engine suggestions">
 
 <!ENTITY  acceptCookies.label           "Accept cookies from sites">
 <!ENTITY  acceptCookies.accesskey       "A">
 
 <!ENTITY  acceptThirdParty.pre.label      "Accept third-party cookies:">
 <!ENTITY  acceptThirdParty.pre.accesskey  "y">
 <!ENTITY  acceptThirdParty.always.label   "Always">
 <!ENTITY  acceptThirdParty.never.label    "Never">
@@ -59,18 +60,18 @@
 <!ENTITY  close.label                   "I close &brandShortName;">
 
 <!ENTITY  cookieExceptions.label        "Exceptions…">
 <!ENTITY  cookieExceptions.accesskey    "E">
 
 <!ENTITY  showCookies.label             "Show Cookies…">
 <!ENTITY  showCookies.accesskey         "S">
 
-<!ENTITY  historyHeader.pre.label          "&brandShortName; will:">
-<!ENTITY  historyHeader.pre.accesskey      "w">
+<!ENTITY  historyHeader2.pre.label         "&brandShortName; will">
+<!ENTITY  historyHeader2.pre.accesskey     "w">
 <!ENTITY  historyHeader.remember.label     "Remember history">
 <!ENTITY  historyHeader.dontremember.label "Never remember history">
 <!ENTITY  historyHeader.custom.label       "Use custom settings for history">
 <!ENTITY  historyHeader.post.label         "">
 
 <!ENTITY  rememberDescription.label      "&brandShortName; will remember your browsing, download, form and search history, and keep cookies from websites you visit.">
 
 <!-- LOCALIZATION NOTE (rememberActions.pre.label): include a trailing space as needed -->
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -225,16 +225,31 @@ treecol {
   font-weight: normal;
 }
 
 .doNotTrackLearnMore > label {
   font-size: 1em !important;
   margin-left: 0;
 }
 
+/* This learn-more link is inserted at the end of a
+   xul:description element so it should behave like normal text. */
+#trackingProtectionLearnMore {
+  white-space: normal;
+  margin-inline-start: 0;
+}
+
+#trackingProtectionAdvancedSettings {
+  margin-inline-start: 15px;
+}
+
+#crashReporterGroup {
+  margin-top: 0;
+}
+
 /* Collapse the non-active vboxes in decks to use only the height the
    active vbox needs */
 #historyPane:not([selectedIndex="1"]) > #historyDontRememberPane,
 #historyPane:not([selectedIndex="2"]) > #historyCustomPane,
 #weavePrefsDeck:not([selectedIndex="1"]) > #hasFxaAccount,
 #fxaLoginStatus:not([selectedIndex="1"]) > #fxaLoginUnverified,
 #fxaLoginStatus:not([selectedIndex="2"]) > #fxaLoginRejected {
   visibility: collapse;