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

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

Issue 2085103002: Only process checked state changed for specific roles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix formatting; use onEventIfInRange Created 4 years, 6 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 be3ffc717e0bbc8b173c64a5b6041c92cadcdb57..724272e27a88e2b63cc283707ad779ade48bd92b 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
@@ -45,7 +45,7 @@ DesktopAutomationHandler = function(node) {
this.addListener_(e.activedescendantchanged, this.onActiveDescendantChanged);
this.addListener_(e.alert, this.onAlert);
this.addListener_(e.ariaAttributeChanged, this.onEventIfInRange);
- this.addListener_(e.checkedStateChanged, this.onEventIfInRange);
+ this.addListener_(e.checkedStateChanged, this.onCheckedStateChanged);
this.addListener_(e.focus, this.onFocus);
this.addListener_(e.hover, this.onHover);
this.addListener_(e.loadComplete, this.onLoadComplete);
@@ -195,6 +195,19 @@ DesktopAutomationHandler.prototype = {
},
/**
+ * Provides all feedback once a checked state changed event fires.
+ * @param {!AutomationEvent} evt
+ */
+ onCheckedStateChanged: function(evt) {
+ if (!AutomationPredicate.checkable(evt.target))
+ return;
+
+ this.onEventIfInRange(
+ new chrome.automation.AutomationEvent(
+ EventType.checkedStateChanged, evt.target));
+ },
+
+ /**
* Provides all feedback once a focus event fires.
* @param {!AutomationEvent} evt
*/
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698