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 2b56429048988d69a4848ee11ffe301adb45f3d3..ec6f3999528e36122b3b35187ae49b6c398b6b8d 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 |
@@ -72,9 +72,11 @@ DesktopAutomationHandler = function(node) { |
return; |
if (focus) { |
- this.onFocus( |
- new chrome.automation.AutomationEvent( |
- EventType.focus, focus, 'page')); |
+ var event = new chrome.automation.AutomationEvent(); |
Devlin
2017/01/04 23:54:21
rietveld thinks there's an illegal character here,
|
+ event.type = EventType.focus; |
+ event.target = focus; |
+ event.eventFrom = 'page'; |
+ this.onFocus(event); |
} |
}).bind(this)); |
}.bind(this)); |
@@ -205,8 +207,11 @@ DesktopAutomationHandler.prototype = { |
onActiveDescendantChanged: function(evt) { |
if (!evt.target.activeDescendant || !evt.target.state.focused) |
return; |
- this.onEventDefault(new chrome.automation.AutomationEvent( |
- EventType.focus, evt.target.activeDescendant, evt.eventFrom)); |
+ var event = new chrome.automation.AutomationEvent(); |
+ event.type = EventType.focus; |
+ event.target = evt.target.activeDescendant; |
+ event.eventFrom = evt.eventFrom; |
+ this.onEventDefault(event); |
}, |
/** |
@@ -232,9 +237,11 @@ DesktopAutomationHandler.prototype = { |
return; |
Output.forceModeForNextSpeechUtterance(cvox.QueueMode.CATEGORY_FLUSH); |
- this.onEventIfInRange( |
- new chrome.automation.AutomationEvent( |
- EventType.checkedStateChanged, evt.target, evt.eventFrom)); |
+ var event = new chrome.automation.AutomationEvent(); |
+ event.type = EventType.checkedStateChanged; |
+ event.target = evt.target; |
+ event.eventFrom = evt.eventFrom; |
+ this.onEventIfInRange(event); |
}, |
/** |
@@ -279,8 +286,11 @@ DesktopAutomationHandler.prototype = { |
return; |
} |
- this.onEventDefault(new chrome.automation.AutomationEvent( |
- EventType.focus, node, evt.eventFrom)); |
+ var event = new chrome.automation.AutomationEvent(); |
+ event.type = EventType.focus; |
+ event.target = node; |
+ event.eventFrom = evt.eventFrom; |
+ this.onEventDefault(event); |
}, |
/** |
@@ -487,9 +497,11 @@ DesktopAutomationHandler.prototype = { |
// after you close them. |
chrome.automation.getFocus(function(focus) { |
if (focus) { |
- this.onFocus( |
- new chrome.automation.AutomationEvent( |
- EventType.focus, focus, 'page')); |
+ var event = new chrome.automation.AutomationEvent(); |
+ event.type = EventType.focus; |
+ event.target = focus; |
+ event.eventFrom = 'page'; |
+ this.onFocus(event); |
} |
}.bind(this)); |
}, |