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

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

Issue 2389793002: Don't read aria attribute changes on editables. (Closed)
Patch Set: Created 4 years, 2 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 | « 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 Handles automation from a desktop automation node. 6 * @fileoverview Handles automation from a desktop automation node.
7 */ 7 */
8 8
9 goog.provide('DesktopAutomationHandler'); 9 goog.provide('DesktopAutomationHandler');
10 10
(...skipping 28 matching lines...) Expand all
39 /** 39 /**
40 * The last time we handled a value changed event. 40 * The last time we handled a value changed event.
41 * @type {!Date} 41 * @type {!Date}
42 * @private 42 * @private
43 */ 43 */
44 this.lastValueChanged_ = new Date(0); 44 this.lastValueChanged_ = new Date(0);
45 45
46 var e = EventType; 46 var e = EventType;
47 this.addListener_(e.activedescendantchanged, this.onActiveDescendantChanged); 47 this.addListener_(e.activedescendantchanged, this.onActiveDescendantChanged);
48 this.addListener_(e.alert, this.onAlert); 48 this.addListener_(e.alert, this.onAlert);
49 this.addListener_(e.ariaAttributeChanged, this.onEventIfInRange); 49 this.addListener_(e.ariaAttributeChanged, this.onAriaAttributeChanged);
50 this.addListener_(e.autocorrectionOccured, this.onEventIfInRange); 50 this.addListener_(e.autocorrectionOccured, this.onEventIfInRange);
51 this.addListener_(e.checkedStateChanged, this.onCheckedStateChanged); 51 this.addListener_(e.checkedStateChanged, this.onCheckedStateChanged);
52 this.addListener_(e.childrenChanged, this.onActiveDescendantChanged); 52 this.addListener_(e.childrenChanged, this.onActiveDescendantChanged);
53 this.addListener_(e.expandedChanged, this.onEventIfInRange); 53 this.addListener_(e.expandedChanged, this.onEventIfInRange);
54 this.addListener_(e.focus, this.onFocus); 54 this.addListener_(e.focus, this.onFocus);
55 this.addListener_(e.hover, this.onHover); 55 this.addListener_(e.hover, this.onHover);
56 this.addListener_(e.invalidStatusChanged, this.onEventIfInRange); 56 this.addListener_(e.invalidStatusChanged, this.onEventIfInRange);
57 this.addListener_(e.loadComplete, this.onLoadComplete); 57 this.addListener_(e.loadComplete, this.onLoadComplete);
58 this.addListener_(e.menuEnd, this.onMenuEnd); 58 this.addListener_(e.menuEnd, this.onMenuEnd);
59 this.addListener_(e.menuListItemSelected, this.onEventIfSelected); 59 this.addListener_(e.menuListItemSelected, this.onEventIfSelected);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 * @param {!AutomationEvent} evt 175 * @param {!AutomationEvent} evt
176 */ 176 */
177 onEventWithFlushedOutput: function(evt) { 177 onEventWithFlushedOutput: function(evt) {
178 Output.forceModeForNextSpeechUtterance(cvox.QueueMode.FLUSH); 178 Output.forceModeForNextSpeechUtterance(cvox.QueueMode.FLUSH);
179 this.onEventDefault(evt); 179 this.onEventDefault(evt);
180 }, 180 },
181 181
182 /** 182 /**
183 * @param {!AutomationEvent} evt 183 * @param {!AutomationEvent} evt
184 */ 184 */
185 onAriaAttributeChanged: function(evt) {
186 if (evt.target.state.editable)
187 return;
188 this.onEventIfInRange(evt);
189 },
190
191 /**
192 * @param {!AutomationEvent} evt
193 */
185 onHover: function(evt) { 194 onHover: function(evt) {
186 if (ChromeVoxState.instance.currentRange && 195 if (ChromeVoxState.instance.currentRange &&
187 evt.target == ChromeVoxState.instance.currentRange.start.node) 196 evt.target == ChromeVoxState.instance.currentRange.start.node)
188 return; 197 return;
189 Output.forceModeForNextSpeechUtterance(cvox.QueueMode.FLUSH); 198 Output.forceModeForNextSpeechUtterance(cvox.QueueMode.FLUSH);
190 this.onEventDefault(evt); 199 this.onEventDefault(evt);
191 }, 200 },
192 201
193 /** 202 /**
194 * Makes an announcement without changing focus. 203 * Makes an announcement without changing focus.
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 DesktopAutomationHandler.init_ = function() { 476 DesktopAutomationHandler.init_ = function() {
468 chrome.automation.getDesktop(function(desktop) { 477 chrome.automation.getDesktop(function(desktop) {
469 ChromeVoxState.desktopAutomationHandler = 478 ChromeVoxState.desktopAutomationHandler =
470 new DesktopAutomationHandler(desktop); 479 new DesktopAutomationHandler(desktop);
471 }); 480 });
472 }; 481 };
473 482
474 DesktopAutomationHandler.init_(); 483 DesktopAutomationHandler.init_();
475 484
476 }); // goog.scope 485 }); // goog.scope
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