| Index: ui/webui/resources/js/cr/ui/context_menu_button.js
|
| diff --git a/ui/webui/resources/js/cr/ui/context_menu_button.js b/ui/webui/resources/js/cr/ui/context_menu_button.js
|
| index 51d1b52f57fb36ab2be96c435bc847b5afc23ebe..7d324e3ce0fde81f7e45aac4e434ca55edb84bbf 100644
|
| --- a/ui/webui/resources/js/cr/ui/context_menu_button.js
|
| +++ b/ui/webui/resources/js/cr/ui/context_menu_button.js
|
| @@ -13,15 +13,14 @@
|
| /**
|
| * Helper function for ContextMenuButton to find the first ancestor of the
|
| * button that has a context menu.
|
| - * @param {!cr.ui.MenuButton} button The button to start the search from.
|
| + * @param {!MenuButton} el The button to start the search from.
|
| * @return {HTMLElement} The found element or null if not found.
|
| */
|
| - function getContextMenuTarget(button) {
|
| - var el = button;
|
| + function getContextMenuTarget(el) {
|
| do {
|
| el = el.parentNode;
|
| } while (el && !('contextMenu' in el));
|
| - return el ? assertInstanceof(el, HTMLElement) : null;
|
| + return el;
|
| }
|
|
|
| /**
|
| @@ -29,7 +28,7 @@
|
| * ancestor that has a {@code contextMenu} property.
|
| * @param {Object=} opt_propertyBag Optional properties.
|
| * @constructor
|
| - * @extends {cr.ui.MenuButton}
|
| + * @extends {MenuButton}
|
| */
|
| var ContextMenuButton = cr.ui.define('button');
|
|
|
| @@ -81,7 +80,7 @@
|
| var self = this;
|
| window.setTimeout(function() {
|
| MenuButton.prototype.showMenu.call(self, shouldSetFocus);
|
| - }, 0);
|
| + });
|
| }
|
| };
|
|
|
|
|