Bug 1207491 - Part 1: Remove use of expression closure from browser/components/customizableui/CustomizableUI.jsm. r=Gijs

--HG--
extra : commitid : 2vcX8649iY4
extra : rebase_source : 9ddd0cd25f0bcfd813a14ed39d31a0e7d78f8716
This commit is contained in:
Tooru Fujisawa 2015-09-21 00:39:52 +09:00
parent 6e2ecba32f
commit 8cad6537b1

View File

@ -2255,7 +2255,7 @@ var CustomizableUIInternal = {
}
delete widget.implementation.currentArea;
widget.implementation.__defineGetter__("currentArea", function() widget.currentArea);
widget.implementation.__defineGetter__("currentArea", () => widget.currentArea);
const kReqStringProps = ["id"];
for (let prop of kReqStringProps) {
@ -2737,79 +2737,79 @@ this.CustomizableUI = {
/**
* Constant reference to the ID of the menu panel.
*/
get AREA_PANEL() "PanelUI-contents",
AREA_PANEL: "PanelUI-contents",
/**
* Constant reference to the ID of the navigation toolbar.
*/
get AREA_NAVBAR() "nav-bar",
AREA_NAVBAR: "nav-bar",
/**
* Constant reference to the ID of the menubar's toolbar.
*/
get AREA_MENUBAR() "toolbar-menubar",
AREA_MENUBAR: "toolbar-menubar",
/**
* Constant reference to the ID of the tabstrip toolbar.
*/
get AREA_TABSTRIP() "TabsToolbar",
AREA_TABSTRIP: "TabsToolbar",
/**
* Constant reference to the ID of the bookmarks toolbar.
*/
get AREA_BOOKMARKS() "PersonalToolbar",
AREA_BOOKMARKS: "PersonalToolbar",
/**
* Constant reference to the ID of the addon-bar toolbar shim.
* Do not use, this will be removed as soon as reasonably possible.
* @deprecated
*/
get AREA_ADDONBAR() "addon-bar",
AREA_ADDONBAR: "addon-bar",
/**
* Constant indicating the area is a menu panel.
*/
get TYPE_MENU_PANEL() "menu-panel",
TYPE_MENU_PANEL: "menu-panel",
/**
* Constant indicating the area is a toolbar.
*/
get TYPE_TOOLBAR() "toolbar",
TYPE_TOOLBAR: "toolbar",
/**
* Constant indicating a XUL-type provider.
*/
get PROVIDER_XUL() "xul",
PROVIDER_XUL: "xul",
/**
* Constant indicating an API-type provider.
*/
get PROVIDER_API() "api",
PROVIDER_API: "api",
/**
* Constant indicating dynamic (special) widgets: spring, spacer, and separator.
*/
get PROVIDER_SPECIAL() "special",
PROVIDER_SPECIAL: "special",
/**
* Constant indicating the widget is built-in
*/
get SOURCE_BUILTIN() "builtin",
SOURCE_BUILTIN: "builtin",
/**
* Constant indicating the widget is externally provided
* (e.g. by add-ons or other items not part of the builtin widget set).
*/
get SOURCE_EXTERNAL() "external",
SOURCE_EXTERNAL: "external",
/**
* The class used to distinguish items that span the entire menu panel.
*/
get WIDE_PANEL_CLASS() "panel-wide-item",
WIDE_PANEL_CLASS: "panel-wide-item",
/**
* The (constant) number of columns in the menu panel.
*/
get PANEL_COLUMN_COUNT() 3,
PANEL_COLUMN_COUNT: 3,
/**
* Constant indicating the reason the event was fired was a window closing
*/
get REASON_WINDOW_CLOSED() "window-closed",
REASON_WINDOW_CLOSED: "window-closed",
/**
* Constant indicating the reason the event was fired was an area being
* unregistered separately from window closing mechanics.
*/
get REASON_AREA_UNREGISTERED() "area-unregistered",
REASON_AREA_UNREGISTERED: "area-unregistered",
/**
@ -3677,10 +3677,10 @@ function WidgetGroupWrapper(aWidget) {
"showInPrivateBrowsing", "viewId"];
for (let prop of kBareProps) {
let propertyName = prop;
this.__defineGetter__(propertyName, function() aWidget[propertyName]);
this.__defineGetter__(propertyName, () => aWidget[propertyName]);
}
this.__defineGetter__("provider", function() CustomizableUI.PROVIDER_API);
this.__defineGetter__("provider", () => CustomizableUI.PROVIDER_API);
this.__defineSetter__("disabled", function(aValue) {
aValue = !!aValue;
@ -3757,10 +3757,10 @@ function WidgetSingleWrapper(aWidget, aNode) {
// Look at the node for these, instead of the widget data, to ensure the
// wrapper always reflects this live instance.
this.__defineGetter__(propertyName,
function() aNode.getAttribute(propertyName));
() => aNode.getAttribute(propertyName));
}
this.__defineGetter__("disabled", function() aNode.disabled);
this.__defineGetter__("disabled", () => aNode.disabled);
this.__defineSetter__("disabled", function(aValue) {
aNode.disabled = !!aValue;
});