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

Unified Diff: ui/accessibility/ax_tree_combiner.cc

Issue 2572923002: AXTreeCombiner no longer needs to convert to global coordinates. (Closed)
Patch Set: Fixed unittests Created 4 years 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_combiner.h ('k') | ui/accessibility/ax_tree_combiner_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_tree_combiner.cc
diff --git a/ui/accessibility/ax_tree_combiner.cc b/ui/accessibility/ax_tree_combiner.cc
index 72a2e95b297052d305d5459ce6043fa4d121b2ad..b983e995519089e62958255fd64ce977f81b2de8 100644
--- a/ui/accessibility/ax_tree_combiner.cc
+++ b/ui/accessibility/ax_tree_combiner.cc
@@ -168,12 +168,6 @@ int32_t AXTreeCombiner::MapId(int32_t tree_id, int32_t node_id) {
}
void AXTreeCombiner::ProcessTree(const AXTreeUpdate* tree) {
- // The root of each tree may contain a transform that needs to apply
- // to all of its descendants.
- gfx::Transform old_transform = transform_;
- if (!tree->nodes.empty() && tree->nodes[0].transform)
- transform_.ConcatTransform(*tree->nodes[0].transform);
-
int32_t tree_id = tree->tree_data.tree_id;
for (size_t i = 0; i < tree->nodes.size(); ++i) {
AXNodeData node = tree->nodes[i];
@@ -186,9 +180,9 @@ void AXTreeCombiner::ProcessTree(const AXTreeUpdate* tree) {
for (size_t j = 0; j < node.child_ids.size(); ++j)
node.child_ids[j] = MapId(tree_id, node.child_ids[j]);
- // Reset the offset container ID because we make all bounding boxes
- // absolute.
- node.offset_container_id = -1;
+ // Map the container id.
+ if (node.offset_container_id > 0)
+ node.offset_container_id = MapId(tree_id, node.offset_container_id);
// Map other int attributes that refer to node IDs, and remove the
// AX_ATTR_CHILD_TREE_ID attribute.
@@ -211,10 +205,6 @@ void AXTreeCombiner::ProcessTree(const AXTreeUpdate* tree) {
}
}
- // Apply the transformation to the object's bounds to put it in
- // the coordinate space of the root frame.
- transform_.TransformRect(&node.location);
-
// See if this node has a child tree. As a sanity check make sure the
// child tree lists this tree as its parent tree id.
const AXTreeUpdate* child_tree = nullptr;
@@ -237,9 +227,6 @@ void AXTreeCombiner::ProcessTree(const AXTreeUpdate* tree) {
if (child_tree)
ProcessTree(child_tree);
}
-
- // Reset the transform.
- transform_ = old_transform;
}
} // namespace ui
« no previous file with comments | « ui/accessibility/ax_tree_combiner.h ('k') | ui/accessibility/ax_tree_combiner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698