Bug 878898: rename 'name' and 'description' properties to 'label' and 'tooltiptext' respectively. r=jaws
authorMike de Boer <mdeboer@mozilla.com>
Tue, 02 Jul 2013 17:10:32 +0200
changeset 164545 26608ffcc23cdc249d3289bca6f5aaaf5a5e17de
parent 164544 930a5d9d769d8753e42ec8ed7d1c76eccf85db3d
child 164546 884a90d5104273f28a64539aaa850952e4edb3f6
push id4703
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 20:24:19 +0000
treeherdermozilla-aurora@20af7fbd96c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs878898
milestone25.0a1
Bug 878898: rename 'name' and 'description' properties to 'label' and 'tooltiptext' respectively. r=jaws
browser/components/customizableui/src/CustomizableUI.jsm
--- a/browser/components/customizableui/src/CustomizableUI.jsm
+++ b/browser/components/customizableui/src/CustomizableUI.jsm
@@ -1369,17 +1369,17 @@ let CustomizableUIInternal = {
     let widget = {
       source: aSource || "addon",
       instances: new Map(),
       currentArea: null,
       removable: false,
       defaultArea: null,
       allowedAreas: [],
       shortcut: null,
-      description: null,
+      tooltiptext: null,
     };
 
     if (typeof aData.id != "string" || !/^[a-z0-9-_]{1,}$/i.test(aData.id)) {
       ERROR("Given an illegal id in normalizeWidget: " + aData.id);
       return null;
     }
 
     const kReqStringProps = ["id"];
@@ -1387,17 +1387,17 @@ let CustomizableUIInternal = {
       if (typeof aData[prop] != "string") {
         ERROR("Missing required property '" + prop + "' in normalizeWidget: "
               + aData.id);
         return null;
       }
       widget[prop] = aData[prop];
     }
 
-    const kOptStringProps = ["name", "tooltiptext", "shortcut"];
+    const kOptStringProps = ["label", "tooltiptext", "shortcut"];
     for (let prop of kOptStringProps) {
       if (typeof aData[prop] == "string") {
         widget[prop] = aData[prop];
       }
     }
 
     if ("removable" in aData && typeof aData.removable == "boolean") {
       widget.removable = aData.removable;
@@ -1855,17 +1855,17 @@ Object.freeze(this.CustomizableUI);
  * WidgetGroupWrapper is the common interface for interacting with an entire
  * widget group - AKA, all instances of a widget across a series of windows.
  * This particular wrapper is only used for widgets created via the provider
  * API.
  */
 function WidgetGroupWrapper(aWidget) {
   this.isGroup = true;
 
-  const kBareProps = ["id", "source", "type", "disabled", "name", "description"];
+  const kBareProps = ["id", "source", "type", "disabled", "label", "tooltiptext"];
   for (let prop of kBareProps) {
     let propertyName = prop;
     this.__defineGetter__(propertyName, function() aWidget[propertyName]);
   }
 
   this.__defineGetter__("provider", function() CustomizableUI.PROVIDER_API);
 
   this.__defineSetter__("disabled", function(aValue) {
@@ -1904,17 +1904,17 @@ function WidgetSingleWrapper(aWidget, aN
   this.node = aNode;
   this.provider = CustomizableUI.PROVIDER_API;
 
   const kGlobalProps = ["id", "type"];
   for (let prop of kGlobalProps) {
     this[prop] = aWidget[prop];
   }
 
-  const nodeProps = ["label", "description"];
+  const nodeProps = ["label", "tooltiptext"];
   for (let prop of nodeProps) {
     let propertyName = prop;
     // 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));
   }