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_MEMBER_OF_ID: |
18 case AX_ATTR_NEXT_ON_LINE_ID: | 18 case AX_ATTR_NEXT_ON_LINE_ID: |
19 case AX_ATTR_PREVIOUS_ON_LINE_ID: | 19 case AX_ATTR_PREVIOUS_ON_LINE_ID: |
20 case AX_ATTR_TABLE_HEADER_ID: | 20 case AX_ATTR_TABLE_HEADER_ID: |
21 case AX_ATTR_TABLE_COLUMN_HEADER_ID: | 21 case AX_ATTR_TABLE_COLUMN_HEADER_ID: |
22 case AX_ATTR_TABLE_ROW_HEADER_ID: | 22 case AX_ATTR_TABLE_ROW_HEADER_ID: |
23 return true; | 23 return true; |
24 | 24 |
25 // Note: all of the attributes are included here explicitly, | 25 // Note: all of the attributes are included here explicitly, |
26 // 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 |
27 // add a new attribute without explicitly considering whether it's | 27 // add a new attribute without explicitly considering whether it's |
28 // a node id attribute or not. | 28 // a node id attribute or not. |
29 case AX_INT_ATTRIBUTE_NONE: | 29 case AX_INT_ATTRIBUTE_NONE: |
| 30 case AX_ATTR_ACTION: |
30 case AX_ATTR_SCROLL_X: | 31 case AX_ATTR_SCROLL_X: |
31 case AX_ATTR_SCROLL_X_MIN: | 32 case AX_ATTR_SCROLL_X_MIN: |
32 case AX_ATTR_SCROLL_X_MAX: | 33 case AX_ATTR_SCROLL_X_MAX: |
33 case AX_ATTR_SCROLL_Y: | 34 case AX_ATTR_SCROLL_Y: |
34 case AX_ATTR_SCROLL_Y_MIN: | 35 case AX_ATTR_SCROLL_Y_MIN: |
35 case AX_ATTR_SCROLL_Y_MAX: | 36 case AX_ATTR_SCROLL_Y_MAX: |
36 case AX_ATTR_TEXT_SEL_START: | 37 case AX_ATTR_TEXT_SEL_START: |
37 case AX_ATTR_TEXT_SEL_END: | 38 case AX_ATTR_TEXT_SEL_END: |
38 case AX_ATTR_TABLE_ROW_COUNT: | 39 case AX_ATTR_TABLE_ROW_COUNT: |
39 case AX_ATTR_TABLE_COLUMN_COUNT: | 40 case AX_ATTR_TABLE_COLUMN_COUNT: |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 // Recurse into the child tree now, if any. | 237 // Recurse into the child tree now, if any. |
237 if (child_tree) | 238 if (child_tree) |
238 ProcessTree(child_tree); | 239 ProcessTree(child_tree); |
239 } | 240 } |
240 | 241 |
241 // Reset the transform. | 242 // Reset the transform. |
242 transform_ = old_transform; | 243 transform_ = old_transform; |
243 } | 244 } |
244 | 245 |
245 } // namespace ui | 246 } // namespace ui |
OLD | NEW |