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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_menu_item.js

Issue 2760803002: Set limit on maximum width of ChromeVox menus. (Closed)
Patch Set: Rebase Created 3 years, 9 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.css ('k') | 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 5 /**
6 * @fileoverview An item in a drop-down menu in the ChromeVox panel. 6 * @fileoverview An item in a drop-down menu in the ChromeVox panel.
7 */ 7 */
8 8
9 goog.provide('PanelMenuItem'); 9 goog.provide('PanelMenuItem');
10 10
(...skipping 13 matching lines...) Expand all
24 this.element.tabIndex = -1; 24 this.element.tabIndex = -1;
25 this.element.setAttribute('role', 'menuitem'); 25 this.element.setAttribute('role', 'menuitem');
26 26
27 this.element.addEventListener('mouseover', (function(evt) { 27 this.element.addEventListener('mouseover', (function(evt) {
28 this.element.focus(); 28 this.element.focus();
29 }).bind(this), false); 29 }).bind(this), false);
30 30
31 var title = document.createElement('td'); 31 var title = document.createElement('td');
32 title.className = 'menu-item-title'; 32 title.className = 'menu-item-title';
33 title.textContent = menuItemTitle; 33 title.textContent = menuItemTitle;
34
35 // Tooltip in case the menu item is cut off.
36 title.title = menuItemTitle;
34 this.element.appendChild(title); 37 this.element.appendChild(title);
35 38
36 var shortcut = document.createElement('td'); 39 var shortcut = document.createElement('td');
37 shortcut.className = 'menu-item-shortcut'; 40 shortcut.className = 'menu-item-shortcut';
38 shortcut.textContent = menuItemShortcut; 41 shortcut.textContent = menuItemShortcut;
39 this.element.appendChild(shortcut); 42 this.element.appendChild(shortcut);
40 43
41 if (localStorage['brailleCaptions'] === String(true)) { 44 if (localStorage['brailleCaptions'] === String(true)) {
42 var braille = document.createElement('td'); 45 var braille = document.createElement('td');
43 braille.className = 'menu-item-shortcut'; 46 braille.className = 'menu-item-shortcut';
44 braille.textContent = menuItemBraille; 47 braille.textContent = menuItemBraille;
45 this.element.appendChild(braille); 48 this.element.appendChild(braille);
46 } 49 }
47 }; 50 };
48 51
49 PanelMenuItem.prototype = { 52 PanelMenuItem.prototype = {
50 get text() { 53 get text() {
51 return this.element.textContent; 54 return this.element.textContent;
52 } 55 }
53 }; 56 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698