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

Unified Diff: chrome/renderer/resources/extensions/automation/automation_node.js

Issue 2080573003: Track all changed nodes during an update (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make suggested change. Created 4 years, 3 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/renderer/resources/extensions/automation/automation_node.js
diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js b/chrome/renderer/resources/extensions/automation/automation_node.js
index f273f7660a27812e43c01c8089d678a13ef631ff..b19a3385a05ac605355e518630dc644d872c0e79 100644
--- a/chrome/renderer/resources/extensions/automation/automation_node.js
+++ b/chrome/renderer/resources/extensions/automation/automation_node.js
@@ -409,14 +409,14 @@ AutomationNodeImpl.prototype = {
attributes: this.attributes };
},
- dispatchEvent: function(eventType) {
+ dispatchEvent: function(eventType, eventFrom) {
var path = [];
var parent = this.parent;
while (parent) {
$Array.push(path, parent);
parent = parent.parent;
}
- var event = new AutomationEvent(eventType, this.wrapper);
+ var event = new AutomationEvent(eventType, this.wrapper, eventFrom);
// Dispatch the event through the propagation path in three phases:
// - capturing: starting from the root and going down to the target's parent
@@ -963,7 +963,7 @@ AutomationRootNodeImpl.prototype = {
},
destroy: function() {
- this.dispatchEvent(schema.EventType.destroyed);
+ this.dispatchEvent(schema.EventType.destroyed, 'none');
for (var id in this.axNodeDataCache_)
this.remove(id);
this.detach();
@@ -977,7 +977,8 @@ AutomationRootNodeImpl.prototype = {
var targetNode = this.get(eventParams.targetID);
if (targetNode) {
var targetNodeImpl = privates(targetNode).impl;
- targetNodeImpl.dispatchEvent(eventParams.eventType);
+ targetNodeImpl.dispatchEvent(
+ eventParams.eventType, eventParams.eventFrom);
} else {
logging.WARNING('Got ' + eventParams.eventType +
' event on unknown node: ' + eventParams.targetID +

Powered by Google App Engine
This is Rietveld 408576698