OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_node_data.h" | 5 #include "ui/accessibility/ax_node_data.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <set> | 10 #include <set> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 case AX_ATTR_TABLE_HEADER_ID: | 84 case AX_ATTR_TABLE_HEADER_ID: |
85 case AX_ATTR_TABLE_COLUMN_HEADER_ID: | 85 case AX_ATTR_TABLE_COLUMN_HEADER_ID: |
86 case AX_ATTR_TABLE_ROW_HEADER_ID: | 86 case AX_ATTR_TABLE_ROW_HEADER_ID: |
87 return true; | 87 return true; |
88 | 88 |
89 // Note: all of the attributes are included here explicitly, | 89 // Note: all of the attributes are included here explicitly, |
90 // rather than using "default:", so that it's a compiler error to | 90 // rather than using "default:", so that it's a compiler error to |
91 // add a new attribute without explicitly considering whether it's | 91 // add a new attribute without explicitly considering whether it's |
92 // a node id attribute or not. | 92 // a node id attribute or not. |
93 case AX_INT_ATTRIBUTE_NONE: | 93 case AX_INT_ATTRIBUTE_NONE: |
94 case AX_ATTR_ACTION: | 94 case AX_ATTR_DEFAULT_ACTION_VERB: |
95 case AX_ATTR_SCROLL_X: | 95 case AX_ATTR_SCROLL_X: |
96 case AX_ATTR_SCROLL_X_MIN: | 96 case AX_ATTR_SCROLL_X_MIN: |
97 case AX_ATTR_SCROLL_X_MAX: | 97 case AX_ATTR_SCROLL_X_MAX: |
98 case AX_ATTR_SCROLL_Y: | 98 case AX_ATTR_SCROLL_Y: |
99 case AX_ATTR_SCROLL_Y_MIN: | 99 case AX_ATTR_SCROLL_Y_MIN: |
100 case AX_ATTR_SCROLL_Y_MAX: | 100 case AX_ATTR_SCROLL_Y_MAX: |
101 case AX_ATTR_TEXT_SEL_START: | 101 case AX_ATTR_TEXT_SEL_START: |
102 case AX_ATTR_TEXT_SEL_END: | 102 case AX_ATTR_TEXT_SEL_END: |
103 case AX_ATTR_TABLE_ROW_COUNT: | 103 case AX_ATTR_TABLE_ROW_COUNT: |
104 case AX_ATTR_TABLE_COLUMN_COUNT: | 104 case AX_ATTR_TABLE_COLUMN_COUNT: |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 | 448 |
449 if (offset_container_id != -1) | 449 if (offset_container_id != -1) |
450 result += " offset_container_id=" + IntToString(offset_container_id); | 450 result += " offset_container_id=" + IntToString(offset_container_id); |
451 | 451 |
452 if (transform && !transform->IsIdentity()) | 452 if (transform && !transform->IsIdentity()) |
453 result += " transform=" + transform->ToString(); | 453 result += " transform=" + transform->ToString(); |
454 | 454 |
455 for (size_t i = 0; i < int_attributes.size(); ++i) { | 455 for (size_t i = 0; i < int_attributes.size(); ++i) { |
456 std::string value = IntToString(int_attributes[i].second); | 456 std::string value = IntToString(int_attributes[i].second); |
457 switch (int_attributes[i].first) { | 457 switch (int_attributes[i].first) { |
458 case AX_ATTR_ACTION: | 458 case AX_ATTR_DEFAULT_ACTION_VERB: |
459 result += | 459 result += |
460 " action=" + | 460 " action=" + |
461 base::UTF16ToUTF8(ActionToUnlocalizedString( | 461 base::UTF16ToUTF8(ActionVerbToUnlocalizedString( |
462 static_cast<AXSupportedAction>(int_attributes[i].second))); | 462 static_cast<AXDefaultActionVerb>(int_attributes[i].second))); |
463 break; | 463 break; |
464 case AX_ATTR_SCROLL_X: | 464 case AX_ATTR_SCROLL_X: |
465 result += " scroll_x=" + value; | 465 result += " scroll_x=" + value; |
466 break; | 466 break; |
467 case AX_ATTR_SCROLL_X_MIN: | 467 case AX_ATTR_SCROLL_X_MIN: |
468 result += " scroll_x_min=" + value; | 468 result += " scroll_x_min=" + value; |
469 break; | 469 break; |
470 case AX_ATTR_SCROLL_X_MAX: | 470 case AX_ATTR_SCROLL_X_MAX: |
471 result += " scroll_x_max=" + value; | 471 result += " scroll_x_max=" + value; |
472 break; | 472 break; |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 } | 905 } |
906 } | 906 } |
907 | 907 |
908 if (!child_ids.empty()) | 908 if (!child_ids.empty()) |
909 result += " child_ids=" + IntVectorToString(child_ids); | 909 result += " child_ids=" + IntVectorToString(child_ids); |
910 | 910 |
911 return result; | 911 return result; |
912 } | 912 } |
913 | 913 |
914 } // namespace ui | 914 } // namespace ui |
OLD | NEW |