Bug 1372583 - Hide about:preferences#containers panel in search result r?jaws
MozReview-Commit-ID: Fv3W3qqXsTt
--- a/browser/components/preferences/in-content-new/containers.xul
+++ b/browser/components/preferences/in-content-new/containers.xul
@@ -24,17 +24,18 @@
<hbox id="header-containers"
class="header"
hidden="true"
data-category="paneContainers">
<label class="header-name" flex="1">&paneContainers.title;</label>
</hbox>
<!-- Containers -->
-<groupbox id="browserContainersGroup" data-category="paneContainers" hidden="true">
+<groupbox id="browserContainersGroupPane" data-category="paneContainers" hidden="true"
+ data-hidden-from-search="true" data-subpanel="true">
<vbox id="browserContainersbox">
<richlistbox id="containersView" orient="vertical" persist="lastSelectedType"
flex="1">
<listheader equalsize="always">
<treecol id="typeColumn" value="type"
persist="sortDirection"
flex="1" sortDirection="ascending"/>
--- a/browser/components/preferences/in-content-new/preferences.js
+++ b/browser/components/preferences/in-content-new/preferences.js
@@ -216,17 +216,18 @@ function gotoPref(aCategory) {
function search(aQuery, aAttribute, aSubquery, aSubAttribute) {
let mainPrefPane = document.getElementById("mainPrefPane");
let elements = mainPrefPane.children;
for (let element of elements) {
// If the "data-hidden-from-search" is "true", the
// element will not get considered during search. This
// should only be used when an element is still under
// development and should not be shown for any reason.
- if (element.getAttribute("data-hidden-from-search") != "true") {
+ if (element.getAttribute("data-hidden-from-search") != "true" ||
+ element.getAttribute("data-subpanel") == "true") {
let attributeValue = element.getAttribute(aAttribute);
if (attributeValue == aQuery) {
if (!element.classList.contains("header") &&
aSubquery && aSubAttribute) {
let subAttributeValue = element.getAttribute(aSubAttribute);
element.hidden = subAttributeValue != aSubquery;
} else {
element.hidden = false;