mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 284673 Followup to bug 913734 to remove sepcial handling for now-removed now-unused policy machinery from about:config r=gavin
This commit is contained in:
parent
7a136c4630
commit
f2bc2857a3
@ -6,7 +6,6 @@
|
||||
const {classes: Cc, interfaces: Ci, manager: Cm, utils: Cu} = Components;
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const PRIVATE_PREF_PREFIX = "capability."; // Tag to prevent exposing private preferences
|
||||
const INITIAL_PAGE_DELAY = 500; // Initial pause on program start for scroll alignment
|
||||
const PREFS_BUFFER_MAX = 100; // Max prefs buffer size for getPrefsBuffer()
|
||||
const PAGE_SCROLL_TRIGGER = 200; // Triggers additional getPrefsBuffer() on user scroll-to-bottom
|
||||
@ -86,12 +85,6 @@ var NewPrefDialog = {
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent addition of new "private" preferences
|
||||
if (aPrefName.startsWith(PRIVATE_PREF_PREFIX)) {
|
||||
this._positiveButton.textContent = gStringBundle.GetStringFromName("newPref.privateButton");
|
||||
return;
|
||||
}
|
||||
|
||||
// If item already in list, it's being changed, else added
|
||||
let item = document.querySelector(".pref-item[name=" + aPrefName.quote() + "]");
|
||||
if (item) {
|
||||
@ -206,10 +199,7 @@ var AboutConfig = {
|
||||
this._prefsContainer = document.getElementById("prefs-container");
|
||||
this._loadingContainer = document.getElementById("loading-container");
|
||||
|
||||
let list = Services.prefs.getChildList("", {}).filter(function(aElement) {
|
||||
// Prevent display of "private" preferences
|
||||
return !aElement.startsWith(PRIVATE_PREF_PREFIX);
|
||||
});
|
||||
let list = Services.prefs.getChildList("");
|
||||
this._list = list.sort().map( function AC_getMapPref(aPref) {
|
||||
return new Pref(aPref);
|
||||
}, this);
|
||||
@ -461,8 +451,8 @@ var AboutConfig = {
|
||||
observe: function AC_observe(aSubject, aTopic, aPrefName) {
|
||||
let pref = new Pref(aPrefName);
|
||||
|
||||
// Ignore uninteresting preference changes, and external changes to "private" preferences
|
||||
if ((aTopic != "nsPref:changed") || pref.name.startsWith(PRIVATE_PREF_PREFIX)) {
|
||||
// Ignore uninteresting changes, and avoid "private" preferences
|
||||
if (aTopic != "nsPref:changed") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -86,12 +86,6 @@ var NewPrefDialog = {
|
||||
return;
|
||||
}
|
||||
|
||||
// Avoid "private" preferences
|
||||
if (/^capability\./.test(aPrefName)) {
|
||||
this._positiveButton.textContent = "Private";
|
||||
return;
|
||||
}
|
||||
|
||||
// If item already in list, it's being changed, else added
|
||||
let item = document.querySelector(".pref-item[name=" + aPrefName.quote() + "]");
|
||||
if (item) {
|
||||
@ -207,10 +201,7 @@ var AboutConfig = {
|
||||
this._prefsContainer = document.getElementById("prefs-container");
|
||||
this._loadingContainer = document.getElementById("loading-container");
|
||||
|
||||
let list = Services.prefs.getChildList("", {}).filter(function(aElement) {
|
||||
// Avoid "private" preferences
|
||||
return !(/^capability\./.test(aElement));
|
||||
});
|
||||
let list = Services.prefs.getChildList("");
|
||||
this._list = list.sort().map( function AC_getMapPref(aPref) {
|
||||
return new Pref(aPref);
|
||||
}, this);
|
||||
@ -464,7 +455,7 @@ var AboutConfig = {
|
||||
let pref = new Pref(aPrefName);
|
||||
|
||||
// Ignore uninteresting changes, and avoid "private" preferences
|
||||
if ((aTopic != "nsPref:changed") || /^capability\./.test(pref.name)) {
|
||||
if (aTopic != "nsPref:changed") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -195,9 +195,6 @@ var gPrefListener =
|
||||
if (topic != "nsPref:changed")
|
||||
return;
|
||||
|
||||
if (/^capability\./.test(prefName)) // avoid displaying "private" preferences
|
||||
return;
|
||||
|
||||
var arrayIndex = gPrefArray.length;
|
||||
var viewIndex = arrayIndex;
|
||||
var selectedIndex = view.selection.currentIndex;
|
||||
@ -348,14 +345,7 @@ function onConfigLoad()
|
||||
// Unhide the warning message
|
||||
function ShowPrefs()
|
||||
{
|
||||
var prefArray = gPrefBranch.getChildList("");
|
||||
|
||||
prefArray.forEach(function (prefName) {
|
||||
if (/^capability\./.test(prefName)) // avoid displaying "private" preferences
|
||||
return;
|
||||
|
||||
fetchPref(prefName, gPrefArray.length);
|
||||
});
|
||||
gPrefBranch.getChildList("").forEach(fetchPref);
|
||||
|
||||
var descending = document.getElementsByAttribute("sortDirection", "descending");
|
||||
if (descending.item(0)) {
|
||||
|
Loading…
Reference in New Issue
Block a user