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

Side by Side Diff: chrome/browser/resources/shared/js/cr/ui/menu.js

Issue 6523063: Merge 75013 - WebUI: Fix issue with context menu... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/672/src/
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('cr.ui', function() { 5 cr.define('cr.ui', function() {
6 6
7 const MenuItem = cr.ui.MenuItem; 7 const MenuItem = cr.ui.MenuItem;
8 8
9 /** 9 /**
10 * Creates a new menu element. 10 * Creates a new menu element.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 } 122 }
123 return true; 123 return true;
124 } 124 }
125 125
126 return false; 126 return false;
127 } 127 }
128 }; 128 };
129 129
130 function selectedIndexChanged(selectedIndex, oldSelectedIndex) { 130 function selectedIndexChanged(selectedIndex, oldSelectedIndex) {
131 var oldSelectedItem = this.chidren[oldSelectedIndex]; 131 var oldSelectedItem = this.children[oldSelectedIndex];
132 if (oldSelectedItem) 132 if (oldSelectedItem)
133 oldSelectedItem.selected = false; 133 oldSelectedItem.selected = false;
134 var item = this.selectedItem; 134 var item = this.selectedItem;
135 if (item) 135 if (item)
136 item.selected = true; 136 item.selected = true;
137 } 137 }
138 /** 138 /**
139 * The selected menu item. 139 * The selected menu item.
140 * @type {number} 140 * @type {number}
141 */ 141 */
142 cr.defineProperty(Menu, 'selectedIndex', cr.PropertyKind.JS, 142 cr.defineProperty(Menu, 'selectedIndex', cr.PropertyKind.JS,
143 selectedIndexChanged); 143 selectedIndexChanged);
144 144
145 // Export 145 // Export
146 return { 146 return {
147 Menu: Menu 147 Menu: Menu
148 }; 148 };
149 }); 149 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698