| Index: chrome/renderer/resources/extensions/automation_custom_bindings.js
|
| diff --git a/chrome/renderer/resources/extensions/automation_custom_bindings.js b/chrome/renderer/resources/extensions/automation_custom_bindings.js
|
| index 53222ab0cfba6779c2a41cc2905f451c77d67ed3..15415a91e00f423eb542c708503f5ea4f2e6dc0e 100644
|
| --- a/chrome/renderer/resources/extensions/automation_custom_bindings.js
|
| +++ b/chrome/renderer/resources/extensions/automation_custom_bindings.js
|
| @@ -278,16 +278,20 @@ automationInternal.onAccessibilityEvent.addListener(function(eventParams) {
|
| var id = eventParams.treeID;
|
| var targetTree = AutomationRootNode.getOrCreate(id);
|
|
|
| - // Work around an issue where Chrome sends us 'blur' events on the
|
| - // root node when nothing has focus, we need to treat those as focus
|
| - // events but otherwise not handle blur events specially.
|
| var isFocusEvent = false;
|
| if (eventParams.eventType == schema.EventType.focus) {
|
| isFocusEvent = true;
|
| } else if (eventParams.eventType == schema.EventType.blur) {
|
| + // Work around an issue where Chrome sends us 'blur' events on the
|
| + // root node when nothing has focus, we need to treat those as focus
|
| + // events but otherwise not handle blur events specially.
|
| var node = privates(targetTree).impl.get(eventParams.targetID);
|
| if (node == node.root)
|
| isFocusEvent = true;
|
| + } else if (eventParams.eventType == schema.EventType.mediaStartedPlaying ||
|
| + eventParams.eventType == schema.EventType.mediaStoppedPlaying) {
|
| + // These events are global to the tree.
|
| + eventParams.targetID = privates(targetTree).impl.id;
|
| }
|
|
|
| // When we get a focus event, ignore the actual event target, and instead
|
|
|