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

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

Issue 1705853002: NOT FOR REVIEW. ax tree focus with debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crash Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
index 8b3433604435810b9b08e9816c0d3e7bdc88f161..752c3c82ca1acab9071037d5bff897fe11220b2d 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
@@ -49,6 +49,10 @@ DesktopAutomationHandler = function(node) {
type: chrome.automation.EventType.loadComplete});
}
}
+
+ var focus = chrome.automation.getFocus();
+ if (focus)
+ this.onFocus({target: focus, type: 'focus'});
};
DesktopAutomationHandler.prototype = {
@@ -159,12 +163,17 @@ DesktopAutomationHandler.prototype = {
* @param {Object} evt
*/
onLoadComplete: function(evt) {
+ console.log('onLoadComplete 1');
+ console.log('onLoadComplete 2');
+
ChromeVoxState.instance.refreshMode(evt.target.docUrl);
+ console.log('onLoadComplete 3');
// Don't process nodes inside of web content if ChromeVox Next is inactive.
if (evt.target.root.role != RoleType.desktop &&
ChromeVoxState.instance.mode === ChromeVoxMode.CLASSIC)
return;
+ console.log('onLoadComplete 4');
// If initial focus was already placed on this page (e.g. if a user starts
// tabbing before load complete), then don't move ChromeVox's position on
@@ -172,10 +181,14 @@ DesktopAutomationHandler.prototype = {
if (ChromeVoxState.instance.currentRange &&
ChromeVoxState.instance.currentRange.start.node.root == evt.target)
return;
+ console.log('onLoadComplete 5');
ChromeVoxState.instance.setCurrentRange(cursors.Range.fromNode(evt.target));
+ console.log('onLoadComplete 6');
+
new Output().withRichSpeechAndBraille(
ChromeVoxState.instance.currentRange, null, evt.type).go();
+ console.log('onLoadComplete 7');
},
/** @override */

Powered by Google App Engine
This is Rietveld 408576698