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

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

Issue 2577473003: Implement auto read on load complete (Closed)
Patch Set: Created 4 years 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 bbb2bfa2bf28882b9aee56b546c4bcd796951512..2b56429048988d69a4848ee11ffe301adb45f3d3 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
@@ -297,6 +297,15 @@ DesktopAutomationHandler.prototype = {
// ChromeVox.
this.createTextEditHandlerIfNeeded_(focus);
+ // If auto read is set, skip focus recovery and start reading from the top.
dmazzoni 2016/12/15 17:07:02 Have you considered doing auto-read only if there'
+ if (localStorage['autoRead'] == 'true' &&
+ AutomationUtil.getTopLevelRoot(evt.target) == evt.target) {
+ ChromeVoxState.instance.setCurrentRange(cursors.Range.fromNode(evt.target));
+ cvox.ChromeVox.tts.stop();
+ CommandHandler.onCommand('readFromHere');
+ return;
+ }
+
// 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
// the page.

Powered by Google App Engine
This is Rietveld 408576698