Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: ui/webui/resources/js/cr/ui/context_menu_button.js

Issue 620663004: Revert of All changes to ui/webui/ from bookmarks CL that block other CLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/webui/resources/js/cr/link_controller.js ('k') | ui/webui/resources/js/cr/ui/context_menu_handler.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ });
}
};
« no previous file with comments | « ui/webui/resources/js/cr/link_controller.js ('k') | ui/webui/resources/js/cr/ui/context_menu_handler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698