| OLD | NEW |
| 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 "ui/accessibility/tree_generator.h" | 5 #include "ui/accessibility/tree_generator.h" |
| 6 | 6 |
| 7 #include "ui/accessibility/ax_serializable_tree.h" | 7 #include "ui/accessibility/ax_serializable_tree.h" |
| 8 #include "ui/accessibility/ax_tree.h" | 8 #include "ui/accessibility/ax_tree.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // selected from the next bits from |tree_index|. | 99 // selected from the next bits from |tree_index|. |
| 100 for (int i = 2; i < node_count; ++i) { | 100 for (int i = 2; i < node_count; ++i) { |
| 101 update.nodes[i].id = permuted[i]; | 101 update.nodes[i].id = permuted[i]; |
| 102 update.nodes[i].state = AX_STATE_NONE; | 102 update.nodes[i].state = AX_STATE_NONE; |
| 103 int parent_index = (tree_index % i); | 103 int parent_index = (tree_index % i); |
| 104 tree_index /= i; | 104 tree_index /= i; |
| 105 update.nodes[parent_index].child_ids.push_back(permuted[i]); | 105 update.nodes[parent_index].child_ids.push_back(permuted[i]); |
| 106 } | 106 } |
| 107 | 107 |
| 108 // Unserialize the tree update into the destination tree. | 108 // Unserialize the tree update into the destination tree. |
| 109 CHECK(out_tree->Unserialize(update)) << out_tree->error(); | 109 CHECK(out_tree->Unserialize(update)); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace ui | 112 } // namespace ui |
| OLD | NEW |