Bug 1443593 - Remove FxA preferences from search results when FxA is disabled. r?markh
MozReview-Commit-ID: 3x5wuJLDVWN
--- 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"/>