Bug 1443593 - Remove FxA preferences from search results when FxA is disabled. r?markh draft
authorEdouard Oger <eoger@fastmail.com>
Fri, 09 Mar 2018 14:36:59 -0500
changeset 765428 38f3f991af05ada7eda26e50225f64f15d0935bf
parent 765246 f1965cf7425fe422c9e9c78018f11b97e0a0f229
child 765507 e654dbeef791b634bad4110d83af781b2263599a
push id102070
push userbmo:eoger@fastmail.com
push dateFri, 09 Mar 2018 19:37:26 +0000
reviewersmarkh
bugs1443593
milestone60.0a1
Bug 1443593 - Remove FxA preferences from search results when FxA is disabled. r?markh MozReview-Commit-ID: 3x5wuJLDVWN
browser/components/preferences/in-content/preferences.js
browser/components/preferences/in-content/sync.xul
--- a/browser/components/preferences/in-content/preferences.js
+++ b/browser/components/preferences/in-content/preferences.js
@@ -52,16 +52,17 @@ function init_all() {
 
   gSubDialog.init();
   register_module("paneGeneral", gMainPane);
   register_module("paneSearch", gSearchPane);
   register_module("panePrivacy", gPrivacyPane);
   register_module("paneContainers", gContainersPane);
   if (Services.prefs.getBoolPref("identity.fxaccounts.enabled")) {
     document.getElementById("category-sync").hidden = false;
+    document.getElementById("weavePrefsDeck").removeAttribute("data-hidden-from-search");
     register_module("paneSync", gSyncPane);
   }
   register_module("paneSearchResults", gSearchResultsPane);
   gSearchResultsPane.init();
   gMainPane.preInit();
 
   let categories = document.getElementById("categories");
   categories.addEventListener("select", event => gotoPref(event.target.value));
--- a/browser/components/preferences/in-content/sync.xul
+++ b/browser/components/preferences/in-content/sync.xul
@@ -9,17 +9,18 @@
 
 <hbox id="firefoxAccountCategory"
       class="subcategory"
       hidden="true"
       data-category="paneSync">
   <label class="header-name" flex="1">&paneSync1.title;</label>
 </hbox>
 
-<deck id="weavePrefsDeck" data-category="paneSync" hidden="true">
+<deck id="weavePrefsDeck" data-category="paneSync" hidden="true"
+      data-hidden-from-search="true">
   <groupbox id="noFxaAccount">
     <hbox>
       <vbox flex="1">
         <caption><label id="noFxaCaption">&signedOut.caption;</label></caption>
         <description id="noFxaDescription" flex="1">&signedOut.description;</description>
       </vbox>
       <vbox>
         <image class="fxaSyncIllustration"/>