Bug 1441766 - Fix search keywords for site data and cookies in about:preferences. r=nhnt11 draft
authorJohann Hofmann <jhofmann@mozilla.com>
Wed, 28 Feb 2018 10:04:21 +0100
changeset 760944 c4210201ef682c05fd66838f0aa1cd9dc7a7a680
parent 760943 0a435759fa013686fdc2f3c590aad2812e3a995b
push id100782
push userjhofmann@mozilla.com
push dateWed, 28 Feb 2018 11:21:53 +0000
reviewersnhnt11
bugs1441766
milestone60.0a1
Bug 1441766 - Fix search keywords for site data and cookies in about:preferences. r=nhnt11 When moving cookies to the site data section we forgot about some searchkeywords which were left on the cookies exceptions dialog. We also forgot to remove the status column label when removing the status column. Further, the search tooltip is not displayed correctly on the three vertically aligned dialog buttons (it's always on the last button), because we did not put each of them in its own hbox (which is just way too easy to get wrong and needs a better mid term solution). MozReview-Commit-ID: L6ZaocWsjYU
browser/components/preferences/in-content/preferences.xul
browser/components/preferences/in-content/privacy.xul
browser/locales/en-US/chrome/browser/preferences/siteDataSettings.dtd
--- a/browser/components/preferences/in-content/preferences.xul
+++ b/browser/components/preferences/in-content/preferences.xul
@@ -29,16 +29,18 @@
 <!ENTITY % permissionsDTD SYSTEM "chrome://browser/locale/preferences/permissions.dtd">
 <!ENTITY % passwordManagerDTD SYSTEM "chrome://passwordmgr/locale/passwordManager.dtd">
 <!ENTITY % historyDTD SYSTEM "chrome://mozapps/locale/update/history.dtd">
 <!ENTITY % certManagerDTD SYSTEM "chrome://pippki/locale/certManager.dtd">
 <!ENTITY % deviceManangerDTD SYSTEM "chrome://pippki/locale/deviceManager.dtd">
 <!ENTITY % connectionDTD SYSTEM "chrome://browser/locale/preferences/connection.dtd">
 <!ENTITY % siteDataSettingsDTD SYSTEM
   "chrome://browser/locale/preferences/siteDataSettings.dtd" >
+<!ENTITY % clearSiteDataDTD SYSTEM
+  "chrome://browser/locale/preferences/clearSiteData.dtd" >
 <!ENTITY % privacyDTD SYSTEM "chrome://browser/locale/preferences/privacy.dtd">
 <!ENTITY % searchDTD SYSTEM "chrome://browser/locale/preferences/search.dtd">
 <!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
 <!ENTITY % syncDTD SYSTEM "chrome://browser/locale/preferences/sync.dtd">
 <!ENTITY % securityDTD SYSTEM
   "chrome://browser/locale/preferences/security.dtd">
 <!ENTITY % containersDTD SYSTEM
   "chrome://browser/locale/preferences/containers.dtd">
@@ -59,16 +61,17 @@
 %colorsDTD;
 %permissionsDTD;
 %passwordManagerDTD;
 %historyDTD;
 %certManagerDTD;
 %deviceManangerDTD;
 %connectionDTD;
 %siteDataSettingsDTD;
+%clearSiteDataDTD;
 %privacyDTD;
 %searchDTD;
 %syncBrandDTD;
 %syncDTD;
 %securityDTD;
 %containersDTD;
 %sanitizeDTD;
 %mainDTD;
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -75,25 +75,16 @@
     <hbox>
       <menulist id="historyMode">
         <menupopup>
           <menuitem label="&historyHeader.remember.label;" value="remember" searchkeywords="&rememberDescription1.label;"/>
           <menuitem label="&historyHeader.dontremember.label;" value="dontremember" searchkeywords="&dontrememberDescription.label;"/>
           <menuitem label="&historyHeader.custom.label;" value="custom" searchkeywords="&privateBrowsingPermanent2.label;
                                                                                         &rememberHistory2.label;
                                                                                         &rememberSearchForm.label;
-                                                                                        &acceptCookies4.label;
-                                                                                        &cookieExceptions.label;
-                                                                                        &acceptThirdParty3.pre.label;
-                                                                                        &acceptThirdParty.always.label;
-                                                                                        &acceptThirdParty.visited.label;
-                                                                                        &acceptThirdParty.never.label;
-                                                                                        &keepUntil2.label;
-                                                                                        &expire.label;
-                                                                                        &close.label;
                                                                                         &clearOnClose.label;
                                                                                         &clearOnCloseSettings.label;"/>
         </menupopup>
       </menulist>
     </hbox>
     <label>&historyHeader.post.label;</label>
   </hbox>
   <hbox>
@@ -223,40 +214,49 @@
         </hbox>
         <radio label="&blockCookies.label;"
                value="2"
                accesskey="&blockCookies.accesskey;"
                flex="1" />
       </radiogroup>
     </vbox>
     <vbox>
-      <button id="clearSiteDataButton"
-          class="accessory-button"
-          icon="clear"
-          label="&clearSiteData1.label;" accesskey="&clearSiteData1.accesskey;"/>
-      <button id="siteDataSettings"
-              class="accessory-button"
-              label="&siteDataSettings.label;"
-              accesskey="&siteDataSettings.accesskey;"
-              searchkeywords="&window.title;
-                              &hostCol.label;
-                              &statusCol.label;
-                              &usageCol.label;"/>
-      <button id="cookieExceptions"
-              class="accessory-button"
-              label="&cookieExceptions.label;" accesskey="&cookieExceptions.accesskey;"
-              preference="pref.privacy.disable_button.cookie_exceptions"
-              searchkeywords="&address2.label;
-                              &block.label;
-                              &session.label;
-                              &allow.label;
-                              &removepermission2.label;
-                              &removeallpermissions2.label;
-                              &button.cancel.label;
-                              &button.ok.label;"/>
+      <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
+      <hbox>
+        <button id="clearSiteDataButton"
+            class="accessory-button"
+            icon="clear"
+            searchkeywords="&clearSiteData.label;
+                            &clearCache.label;"
+            label="&clearSiteData1.label;" accesskey="&clearSiteData1.accesskey;"/>
+      </hbox>
+      <hbox>
+        <button id="siteDataSettings"
+                class="accessory-button"
+                label="&siteDataSettings.label;"
+                accesskey="&siteDataSettings.accesskey;"
+                searchkeywords="&window1.title;
+                                &hostCol.label;
+                                &cookiesCol.label;
+                                &usageCol.label;"/>
+      </hbox>
+      <hbox>
+        <button id="cookieExceptions"
+                class="accessory-button"
+                label="&cookieExceptions.label;" accesskey="&cookieExceptions.accesskey;"
+                preference="pref.privacy.disable_button.cookie_exceptions"
+                searchkeywords="&address2.label;
+                                &block.label;
+                                &session.label;
+                                &allow.label;
+                                &removepermission2.label;
+                                &removeallpermissions2.label;
+                                &button.cancel.label;
+                                &button.ok.label;"/>
+      </hbox>
     </vbox>
   </hbox>
 </groupbox>
 
 <!-- Address Bar -->
 <groupbox id="locationBarGroup"
           data-category="panePrivacy"
           hidden="true">
--- a/browser/locales/en-US/chrome/browser/preferences/siteDataSettings.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/siteDataSettings.dtd
@@ -1,15 +1,14 @@
 <!-- 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     window1.title                 "Settings - Cookies and Site Data">
 <!ENTITY     hostCol.label                 "Site">
-<!ENTITY     statusCol.label               "Status">
 <!ENTITY     cookiesCol.label              "Cookies">
 <!ENTITY     usageCol.label                "Storage">
 <!ENTITY     lastAccessedCol.label                "Last Used">
 <!ENTITY     searchTextboxPlaceHolder             "Search websites">
 <!ENTITY     searchTextboxPlaceHolder.accesskey   "S">
 <!ENTITY     removeSelected.label          "Remove Selected">
 <!ENTITY     removeSelected.accesskey      "r">
 <!ENTITY     save.label                    "Save Changes">