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

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

Issue 1631663006: Ignore focus events on role client nodes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 /** 123 /**
124 * Provides all feedback once a focus event fires. 124 * Provides all feedback once a focus event fires.
125 * @param {Object} evt 125 * @param {Object} evt
126 */ 126 */
127 onFocus: function(evt) { 127 onFocus: function(evt) {
128 // Invalidate any previous editable text handler state. 128 // Invalidate any previous editable text handler state.
129 this.textEditHandler_ = null; 129 this.textEditHandler_ = null;
130 130
131 var node = evt.target; 131 var node = evt.target;
132 132
133 // Discard focus events on embeddedObject nodes. 133 // Discard focus events on embeddedObject and client nodes.
134 if (node.role == RoleType.embeddedObject) 134 if (node.role == RoleType.embeddedObject || node.role == RoleType.client)
135 return; 135 return;
136 136
137 // It almost never makes sense to place focus directly on a rootWebArea. 137 // It almost never makes sense to place focus directly on a rootWebArea.
138 if (node.role == RoleType.rootWebArea) { 138 if (node.role == RoleType.rootWebArea) {
139 // Discard focus events for root web areas when focus was previously 139 // Discard focus events for root web areas when focus was previously
140 // placed on a descendant. 140 // placed on a descendant.
141 var currentRange = ChromeVoxState.instance.currentRange; 141 var currentRange = ChromeVoxState.instance.currentRange;
142 if (currentRange && currentRange.start.node.root == node) 142 if (currentRange && currentRange.start.node.root == node)
143 return; 143 return;
144 144
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 if (cvox.ChromeVox.isMac) 309 if (cvox.ChromeVox.isMac)
310 return; 310 return;
311 chrome.automation.getDesktop(function(desktop) { 311 chrome.automation.getDesktop(function(desktop) {
312 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop); 312 global.desktopAutomationHandler = new DesktopAutomationHandler(desktop);
313 }); 313 });
314 }; 314 };
315 315
316 DesktopAutomationHandler.init_(); 316 DesktopAutomationHandler.init_();
317 317
318 }); // goog.scope 318 }); // 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