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

Side by Side Diff: chrome/renderer/extensions/automation_internal_custom_bindings.cc

Issue 2956053005: Keep track of fixed positioning in accessibility tree.
Patch Set: Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/extensions/automation_internal_custom_bindings.h" 5 #include "chrome/renderer/extensions/automation_internal_custom_bindings.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 int tree_id = params.tree_id; 1154 int tree_id = params.tree_id;
1155 auto iter = tree_id_to_tree_cache_map_.find(tree_id); 1155 auto iter = tree_id_to_tree_cache_map_.find(tree_id);
1156 if (iter == tree_id_to_tree_cache_map_.end()) 1156 if (iter == tree_id_to_tree_cache_map_.end())
1157 return; 1157 return;
1158 TreeCache* cache = iter->second; 1158 TreeCache* cache = iter->second;
1159 ui::AXNode* node = cache->tree.GetFromId(params.id); 1159 ui::AXNode* node = cache->tree.GetFromId(params.id);
1160 if (!node) 1160 if (!node)
1161 return; 1161 return;
1162 node->SetLocation(params.new_location.offset_container_id, 1162 node->SetLocation(params.new_location.offset_container_id,
1163 params.new_location.bounds, 1163 params.new_location.bounds,
1164 params.new_location.transform.get()); 1164 params.new_location.transform.get(),
1165 params.new_location.is_fixed_positioned);
1165 } 1166 }
1166 1167
1167 void AutomationInternalCustomBindings::OnNodeDataWillChange( 1168 void AutomationInternalCustomBindings::OnNodeDataWillChange(
1168 ui::AXTree* tree, 1169 ui::AXTree* tree,
1169 const ui::AXNodeData& old_node_data, 1170 const ui::AXNodeData& old_node_data,
1170 const ui::AXNodeData& new_node_data) { 1171 const ui::AXNodeData& new_node_data) {
1171 if (old_node_data.GetStringAttribute(ui::AX_ATTR_NAME) != 1172 if (old_node_data.GetStringAttribute(ui::AX_ATTR_NAME) !=
1172 new_node_data.GetStringAttribute(ui::AX_ATTR_NAME)) 1173 new_node_data.GetStringAttribute(ui::AX_ATTR_NAME))
1173 text_changed_node_ids_.push_back(new_node_data.id); 1174 text_changed_node_ids_.push_back(new_node_data.id);
1174 } 1175 }
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 for (auto id : ids) 1371 for (auto id : ids)
1371 nodes->AppendInteger(id); 1372 nodes->AppendInteger(id);
1372 args.Append(std::move(nodes)); 1373 args.Append(std::move(nodes));
1373 } 1374 }
1374 1375
1375 bindings_system_->DispatchEventInContext("automationInternal.onNodesRemoved", 1376 bindings_system_->DispatchEventInContext("automationInternal.onNodesRemoved",
1376 &args, nullptr, context()); 1377 &args, nullptr, context());
1377 } 1378 }
1378 1379
1379 } // namespace extensions 1380 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698