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

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

Issue 2379423002: Containing webview focus checks assume top level root. (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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 * Provides all feedback once a change event in a text field fires. 324 * Provides all feedback once a change event in a text field fires.
325 * @param {!AutomationEvent} evt 325 * @param {!AutomationEvent} evt
326 * @private 326 * @private
327 */ 327 */
328 onEditableChanged_: function(evt) { 328 onEditableChanged_: function(evt) {
329 // Don't process nodes inside of web content if ChromeVox Next is inactive. 329 // Don't process nodes inside of web content if ChromeVox Next is inactive.
330 if (evt.target.root.role != RoleType.desktop && 330 if (evt.target.root.role != RoleType.desktop &&
331 ChromeVoxState.instance.mode === ChromeVoxMode.CLASSIC) 331 ChromeVoxState.instance.mode === ChromeVoxMode.CLASSIC)
332 return; 332 return;
333 333
334 var topRoot = AutomationUtil.getTopLevelRoot(evt.target);
334 if (!evt.target.state.focused || 335 if (!evt.target.state.focused ||
335 (evt.target.root.role != RoleType.desktop && 336 (topRoot &&
336 evt.target.root.parent && 337 topRoot.parent &&
337 !evt.target.root.parent.state.focused)) 338 !topRoot.parent.state.focused))
338 return; 339 return;
339 340
340 if (!ChromeVoxState.instance.currentRange) { 341 if (!ChromeVoxState.instance.currentRange) {
341 this.onEventDefault(evt); 342 this.onEventDefault(evt);
342 ChromeVoxState.instance.setCurrentRange( 343 ChromeVoxState.instance.setCurrentRange(
343 cursors.Range.fromNode(evt.target)); 344 cursors.Range.fromNode(evt.target));
344 } 345 }
345 346
346 this.createTextEditHandlerIfNeeded_(evt.target); 347 this.createTextEditHandlerIfNeeded_(evt.target);
347 348
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 DesktopAutomationHandler.init_ = function() { 468 DesktopAutomationHandler.init_ = function() {
468 chrome.automation.getDesktop(function(desktop) { 469 chrome.automation.getDesktop(function(desktop) {
469 ChromeVoxState.desktopAutomationHandler = 470 ChromeVoxState.desktopAutomationHandler =
470 new DesktopAutomationHandler(desktop); 471 new DesktopAutomationHandler(desktop);
471 }); 472 });
472 }; 473 };
473 474
474 DesktopAutomationHandler.init_(); 475 DesktopAutomationHandler.init_();
475 476
476 }); // goog.scope 477 }); // 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