Index: chrome/renderer/extensions/automation_internal_custom_bindings.cc |
diff --git a/chrome/renderer/extensions/automation_internal_custom_bindings.cc b/chrome/renderer/extensions/automation_internal_custom_bindings.cc |
index 826859edb42390cdf33ddb20fa405a2085ebf4ae..20457ebcb739bf35484cff12517d75b133550b02 100644 |
--- a/chrome/renderer/extensions/automation_internal_custom_bindings.cc |
+++ b/chrome/renderer/extensions/automation_internal_custom_bindings.cc |
@@ -989,6 +989,13 @@ void AutomationInternalCustomBindings::OnAccessibilityEvent( |
args->Set(0U, event_params); |
context()->DispatchEvent("automationInternal.onAccessibilityEvent", args); |
} |
+void AutomationInternalCustomBindings::OnNodeDataWillChange( |
+ const ui::AXNodeData& old_node_data, |
+ const ui::AXNodeData& new_node_data) { |
+ if (old_node_data.GetStringAttribute(ui::AX_ATTR_NAME) != |
+ new_node_data.GetStringAttribute(ui::AX_ATTR_NAME)) |
+ text_changed_node_ids_.push_back(new_node_data.id); |
+} |
void AutomationInternalCustomBindings::OnTreeDataChanged(ui::AXTree* tree) {} |
@@ -1050,6 +1057,12 @@ void AutomationInternalCustomBindings::OnAtomicUpdateFinished( |
break; |
} |
} |
+ |
+ for (size_t i = 0; i < text_changed_node_ids_.size(); ++i) { |
+ SendTreeChangeEvent(api::automation::TREE_CHANGE_TYPE_TEXTCHANGED, tree, |
+ tree->GetFromId(text_changed_node_ids_[i])); |
+ text_changed_node_ids_.clear(); |
dmazzoni
2016/02/19 23:20:23
This clear should go after the for loop, not insid
|
+ } |
} |
void AutomationInternalCustomBindings::SendTreeChangeEvent( |