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

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

Issue 2151713002: Less strict checked state changes and introduce disabled state for content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m Created 4 years, 5 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 bf88d841f8170caff2ff5ec3c0eabdf023877e89..14fd563dece0c5043cc09f689b5bf856af962b46 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
@@ -129,11 +129,21 @@ DesktopAutomationHandler.prototype = {
* @param {!AutomationEvent} evt
*/
onEventIfInRange: function(evt) {
- // TODO(dtseng): Consider the end of the current range as well.
- if (AutomationUtil.isDescendantOf(
- ChromeVoxState.instance.currentRange.start.node, evt.target) ||
- evt.target.state.focused)
- this.onEventDefault(evt);
+ if (evt.target.root.role != RoleType.desktop &&
+ ChromeVoxState.instance.mode === ChromeVoxMode.CLASSIC)
+ return;
+
+ var prev = ChromeVoxState.instance.currentRange;
+ if (AutomationUtil.isDescendantOf(prev.start.node, evt.target) ||
+ AutomationUtil.isDescendantOf(evt.target, prev.start.node) ||
+ evt.target.state.focused) {
+ // Intentionally skip setting range.
+ new Output()
+ .withRichSpeechAndBraille(cursors.Range.fromNode(evt.target),
+ prev,
+ Output.EventType.NAVIGATE)
+ .go();
+ }
},
/**

Powered by Google App Engine
This is Rietveld 408576698