| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ax_tree.h" | 5 #include "ui/accessibility/ax_tree.h" |
| 6 #include "ui/accessibility/ax_tree_combiner.h" | 6 #include "ui/accessibility/ax_tree_combiner.h" |
| 7 #include "ui/gfx/geometry/rect_f.h" | 7 #include "ui/gfx/geometry/rect_f.h" |
| 8 | 8 |
| 9 namespace ui { | 9 namespace ui { |
| 10 namespace { | 10 namespace { |
| 11 | 11 |
| 12 // Return true if |attr| is a node ID that would need to be mapped when | 12 // Return true if |attr| is a node ID that would need to be mapped when |
| 13 // renumbering the ids in a combined tree. | 13 // renumbering the ids in a combined tree. |
| 14 bool IsNodeIdIntAttribute(AXIntAttribute attr) { | 14 bool IsNodeIdIntAttribute(AXIntAttribute attr) { |
| 15 switch (attr) { | 15 switch (attr) { |
| 16 case AX_ATTR_ACTIVEDESCENDANT_ID: | 16 case AX_ATTR_ACTIVEDESCENDANT_ID: |
| 17 case AX_ATTR_MEMBER_OF_ID: |
| 17 case AX_ATTR_NEXT_ON_LINE_ID: | 18 case AX_ATTR_NEXT_ON_LINE_ID: |
| 18 case AX_ATTR_PREVIOUS_ON_LINE_ID: | 19 case AX_ATTR_PREVIOUS_ON_LINE_ID: |
| 19 case AX_ATTR_TABLE_HEADER_ID: | 20 case AX_ATTR_TABLE_HEADER_ID: |
| 20 case AX_ATTR_TABLE_COLUMN_HEADER_ID: | 21 case AX_ATTR_TABLE_COLUMN_HEADER_ID: |
| 21 case AX_ATTR_TABLE_ROW_HEADER_ID: | 22 case AX_ATTR_TABLE_ROW_HEADER_ID: |
| 22 return true; | 23 return true; |
| 23 | 24 |
| 24 // Note: all of the attributes are included here explicitly, | 25 // Note: all of the attributes are included here explicitly, |
| 25 // rather than using "default:", so that it's a compiler error to | 26 // rather than using "default:", so that it's a compiler error to |
| 26 // add a new attribute without explicitly considering whether it's | 27 // add a new attribute without explicitly considering whether it's |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 // Recurse into the child tree now, if any. | 234 // Recurse into the child tree now, if any. |
| 234 if (child_tree) | 235 if (child_tree) |
| 235 ProcessTree(child_tree); | 236 ProcessTree(child_tree); |
| 236 } | 237 } |
| 237 | 238 |
| 238 // Reset the transform. | 239 // Reset the transform. |
| 239 transform_ = old_transform; | 240 transform_ = old_transform; |
| 240 } | 241 } |
| 241 | 242 |
| 242 } // namespace ui | 243 } // namespace ui |
| OLD | NEW |