Bug 1443593 - Remove FxA preferences from search results when FxA is disabled. r=markh a=jcristau
authorEdouard Oger <eoger@fastmail.com>
Fri, 09 Mar 2018 14:36:59 -0500
changeset 460137 d9668297a5189515fbcd886ba7930c1fba931fab
parent 460136 f08e27292f7efc0313588ec1234cd78ad7d7d8f7
child 460138 4ef3cb563636756a8ea649e2b2ed1bd7e8a460b2
push id8846
push usernerli@mozilla.com
push dateThu, 15 Mar 2018 17:08:05 +0000
treeherdermozilla-beta@d9668297a518 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh, jcristau
bugs1443593
milestone60.0
Bug 1443593 - Remove FxA preferences from search results when FxA is disabled. r=markh a=jcristau 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"/>