Chromium Code Reviews| Index: Source/devtools/front_end/ui/ContextMenu.js |
| diff --git a/Source/devtools/front_end/ui/ContextMenu.js b/Source/devtools/front_end/ui/ContextMenu.js |
| index e98f9e76f9dd23f8d3f9f4ac223bf2ffe4a7961b..5ecf60afed56bb08faaa8b231e9a3b9da9325d29 100644 |
| --- a/Source/devtools/front_end/ui/ContextMenu.js |
| +++ b/Source/devtools/front_end/ui/ContextMenu.js |
| @@ -152,12 +152,14 @@ WebInspector.ContextSubMenuItem.prototype = { |
| }, |
| /** |
| - * @param {string} label |
| * @param {string} actionId |
| + * @param {string=} label |
| * @return {!WebInspector.ContextMenuItem} |
| */ |
| - appendAction: function(label, actionId) |
| + appendAction: function(actionId, label) |
|
pfeldman
2015/08/18 05:08:31
Lets remove the label where possible and migrate t
samli
2015/08/19 05:27:15
Done. Can't remove fully since Main.js:845 overrid
|
| { |
| + if (!label) |
| + label = WebInspector.actionRegistry.getActionDescriptor(actionId).title; |
| var result = this.appendItem(label, WebInspector.actionRegistry.execute.bind(WebInspector.actionRegistry, actionId)); |
| var shortcut = WebInspector.shortcutRegistry.shortcutTitleForAction(actionId); |
| if (shortcut) |
| @@ -435,7 +437,7 @@ WebInspector.ContextMenu.prototype = { |
| if (!group) |
| continue; |
| for (var extension of group) |
| - this.appendAction(extension.title(), extension.descriptor()["actionId"]); |
| + this.appendAction(extension.descriptor()["actionId"], extension.title()); |
| this.appendSeparator(); |
| } |
| }, |