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

Unified Diff: ui/accessibility/ax_tree.cc

Issue 2917363002: Automatically fire AX events on Mac based on tree changes (Closed)
Patch Set: Fix accidental shadowing of BrowserAccessibilityManager::OnAtomicUpdateFinished, caught by browser … Created 3 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 | « ui/accessibility/ax_tree.h ('k') | ui/accessibility/ax_tree_fuzzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_tree.cc
diff --git a/ui/accessibility/ax_tree.cc b/ui/accessibility/ax_tree.cc
index b2c0833204d2c7a415cda0442a467b8406b3a531..03b6aeb8a2cd5912f8e969bb1b9696e9004e27f6 100644
--- a/ui/accessibility/ax_tree.cc
+++ b/ui/accessibility/ax_tree.cc
@@ -154,10 +154,14 @@ AXNode* AXTree::GetFromId(int32_t id) const {
return iter != id_map_.end() ? iter->second : NULL;
}
-void AXTree::UpdateData(const AXTreeData& data) {
- data_ = data;
+void AXTree::UpdateData(const AXTreeData& new_data) {
+ if (data_ == new_data)
+ return;
+
+ AXTreeData old_data = data_;
+ data_ = new_data;
if (delegate_)
- delegate_->OnTreeDataChanged(this);
+ delegate_->OnTreeDataChanged(this, old_data, new_data);
}
bool AXTree::Unserialize(const AXTreeUpdate& update) {
« no previous file with comments | « ui/accessibility/ax_tree.h ('k') | ui/accessibility/ax_tree_fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698