зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1207491 - Part 13: Remove use of expression closure from browser/components/preferences/. r=Gijs
--HG-- extra : commitid : DeDjWQxJsZb extra : rebase_source : 22e70d4e08155fd5d7dbc0acff2c2f66fcc9e808
This commit is contained in:
Родитель
957dc61a9f
Коммит
235d99efee
|
@ -331,8 +331,12 @@ var PermissionDefaults = {
|
|||
let value = (aValue != this.DENY);
|
||||
Services.prefs.setBoolPref("dom.push.enabled", value);
|
||||
},
|
||||
get camera() this.UNKNOWN,
|
||||
get microphone() this.UNKNOWN
|
||||
get camera() {
|
||||
return this.UNKNOWN;
|
||||
},
|
||||
get microphone() {
|
||||
return this.UNKNOWN;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -403,7 +403,7 @@ HandlerInfoWrapper.prototype = {
|
|||
var disabledPluginTypes = this._getDisabledPluginTypes();
|
||||
|
||||
var type = this.type;
|
||||
disabledPluginTypes = disabledPluginTypes.filter(function(v) v != type);
|
||||
disabledPluginTypes = disabledPluginTypes.filter(v => v != type);
|
||||
|
||||
this._prefSvc.setCharPref(PREF_DISABLED_PLUGIN_TYPES,
|
||||
disabledPluginTypes.join(","));
|
||||
|
@ -1549,7 +1549,7 @@ var gApplicationsPane = {
|
|||
case Ci.nsIHandlerInfo.useHelperApp:
|
||||
if (preferredApp)
|
||||
menu.selectedItem =
|
||||
possibleAppMenuItems.filter(function(v) v.handlerApp.equals(preferredApp))[0];
|
||||
possibleAppMenuItems.filter(v => v.handlerApp.equals(preferredApp))[0];
|
||||
break;
|
||||
case kActionUsePlugin:
|
||||
menu.selectedItem = pluginMenuItem;
|
||||
|
|
|
@ -298,7 +298,9 @@ var gMainPane = {
|
|||
{
|
||||
let homePage = document.getElementById("browser.startup.homepage");
|
||||
let tabs = this._getTabsForHomePage();
|
||||
function getTabURI(t) t.linkedBrowser.currentURI.spec;
|
||||
function getTabURI(t) {
|
||||
return t.linkedBrowser.currentURI.spec;
|
||||
}
|
||||
|
||||
// FIXME Bug 244192: using dangerous "|" joiner!
|
||||
if (tabs.length)
|
||||
|
|
|
@ -179,8 +179,7 @@ var gPrivacyPane = {
|
|||
initializeHistoryMode: function PPP_initializeHistoryMode()
|
||||
{
|
||||
let mode;
|
||||
let getVal = function (aPref)
|
||||
document.getElementById(aPref).value;
|
||||
let getVal = aPref => document.getElementById(aPref).value;
|
||||
|
||||
if (this._checkDefaultValues(this.prefsForDefault)) {
|
||||
if (getVal("browser.privatebrowsing.autostart"))
|
||||
|
|
|
@ -318,7 +318,7 @@ function EngineStore() {
|
|||
this._defaultEngines = Services.search.getDefaultEngines().map(this._cloneEngine, this);
|
||||
|
||||
// check if we need to disable the restore defaults button
|
||||
var someHidden = this._defaultEngines.some(function (e) e.hidden);
|
||||
var someHidden = this._defaultEngines.some(e => e.hidden);
|
||||
gSearchPane.showRestoreDefaults(someHidden);
|
||||
}
|
||||
EngineStore.prototype = {
|
||||
|
|
|
@ -25,9 +25,15 @@ function Tree(aId, aData)
|
|||
}
|
||||
|
||||
Tree.prototype = {
|
||||
get boxObject() this._tree.treeBoxObject,
|
||||
get isEmpty() !this._data.length,
|
||||
get hasSelection() this.selection.count > 0,
|
||||
get boxObject() {
|
||||
return this._tree.treeBoxObject;
|
||||
},
|
||||
get isEmpty() {
|
||||
return !this._data.length;
|
||||
},
|
||||
get hasSelection() {
|
||||
return this.selection.count > 0;
|
||||
},
|
||||
getSelectedItems: function() {
|
||||
let result = [];
|
||||
|
||||
|
@ -43,19 +49,35 @@ Tree.prototype = {
|
|||
},
|
||||
|
||||
// nsITreeView implementation
|
||||
get rowCount() this._data.length,
|
||||
getCellText: function (aRow, aColumn) this._data[aRow],
|
||||
isSeparator: function(aIndex) false,
|
||||
isSorted: function() false,
|
||||
isContainer: function(aIndex) false,
|
||||
get rowCount() {
|
||||
return this._data.length;
|
||||
},
|
||||
getCellText: function (aRow, aColumn) {
|
||||
return this._data[aRow];
|
||||
},
|
||||
isSeparator: function(aIndex) {
|
||||
return false;
|
||||
},
|
||||
isSorted: function() {
|
||||
return false;
|
||||
},
|
||||
isContainer: function(aIndex) {
|
||||
return false;
|
||||
},
|
||||
setTree: function(aTree) {},
|
||||
getImageSrc: function(aRow, aColumn) {},
|
||||
getProgressMode: function(aRow, aColumn) {},
|
||||
getCellValue: function(aRow, aColumn) {},
|
||||
cycleHeader: function(column) {},
|
||||
getRowProperties: function(row) "",
|
||||
getColumnProperties: function(column) "",
|
||||
getCellProperties: function(row, column) "",
|
||||
getRowProperties: function(row) {
|
||||
return "";
|
||||
},
|
||||
getColumnProperties: function(column) {
|
||||
return "";
|
||||
},
|
||||
getCellProperties: function(row, column) {
|
||||
return "";
|
||||
},
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView])
|
||||
};
|
||||
|
||||
|
@ -66,7 +88,9 @@ function Lang(aCode)
|
|||
}
|
||||
|
||||
Lang.prototype = {
|
||||
toString: function() this._label
|
||||
toString: function() {
|
||||
return this._label;
|
||||
}
|
||||
}
|
||||
|
||||
var gTranslationExceptions = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче