| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 case AX_ATTR_DESCRIPTION_FROM: | 130 case AX_ATTR_DESCRIPTION_FROM: |
| 131 case AX_ATTR_CHILD_TREE_ID: | 131 case AX_ATTR_CHILD_TREE_ID: |
| 132 case AX_ATTR_SET_SIZE: | 132 case AX_ATTR_SET_SIZE: |
| 133 case AX_ATTR_POS_IN_SET: | 133 case AX_ATTR_POS_IN_SET: |
| 134 case AX_ATTR_COLOR_VALUE: | 134 case AX_ATTR_COLOR_VALUE: |
| 135 case AX_ATTR_ARIA_CURRENT_STATE: | 135 case AX_ATTR_ARIA_CURRENT_STATE: |
| 136 case AX_ATTR_BACKGROUND_COLOR: | 136 case AX_ATTR_BACKGROUND_COLOR: |
| 137 case AX_ATTR_COLOR: | 137 case AX_ATTR_COLOR: |
| 138 case AX_ATTR_INVALID_STATE: | 138 case AX_ATTR_INVALID_STATE: |
| 139 case AX_ATTR_CHECKED_STATE: | 139 case AX_ATTR_CHECKED_STATE: |
| 140 case AX_ATTR_PRESSED_STATE: |
| 140 case AX_ATTR_TEXT_DIRECTION: | 141 case AX_ATTR_TEXT_DIRECTION: |
| 141 case AX_ATTR_TEXT_STYLE: | 142 case AX_ATTR_TEXT_STYLE: |
| 142 case AX_ATTR_ARIA_COLUMN_COUNT: | 143 case AX_ATTR_ARIA_COLUMN_COUNT: |
| 143 case AX_ATTR_ARIA_CELL_COLUMN_INDEX: | 144 case AX_ATTR_ARIA_CELL_COLUMN_INDEX: |
| 144 case AX_ATTR_ARIA_ROW_COUNT: | 145 case AX_ATTR_ARIA_ROW_COUNT: |
| 145 case AX_ATTR_ARIA_CELL_ROW_INDEX: | 146 case AX_ATTR_ARIA_CELL_ROW_INDEX: |
| 146 return false; | 147 return false; |
| 147 } | 148 } |
| 148 | 149 |
| 149 NOTREACHED(); | 150 NOTREACHED(); |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 case AX_INVALID_STATE_GRAMMAR: | 731 case AX_INVALID_STATE_GRAMMAR: |
| 731 result += " invalid_state=grammar"; | 732 result += " invalid_state=grammar"; |
| 732 break; | 733 break; |
| 733 case AX_INVALID_STATE_OTHER: | 734 case AX_INVALID_STATE_OTHER: |
| 734 result += " invalid_state=other"; | 735 result += " invalid_state=other"; |
| 735 break; | 736 break; |
| 736 } | 737 } |
| 737 break; | 738 break; |
| 738 case AX_ATTR_CHECKED_STATE: | 739 case AX_ATTR_CHECKED_STATE: |
| 739 switch (int_attributes[i].second) { | 740 switch (int_attributes[i].second) { |
| 740 case AX_CHECKED_STATE_FALSE: | 741 case AX_BUTTON_STATE_FALSE: |
| 741 result += " checked_state=false"; | 742 result += " checked_state=false"; |
| 742 break; | 743 break; |
| 743 case AX_CHECKED_STATE_TRUE: | 744 case AX_BUTTON_STATE_TRUE: |
| 744 result += " checked_state=true"; | 745 result += " checked_state=true"; |
| 745 break; | 746 break; |
| 746 case AX_CHECKED_STATE_MIXED: | 747 case AX_BUTTON_STATE_MIXED: |
| 747 result += " checked_state=mixed"; | 748 result += " checked_state=mixed"; |
| 748 break; | 749 break; |
| 749 } | 750 } |
| 750 break; | 751 break; |
| 752 case AX_ATTR_PRESSED_STATE: |
| 753 switch (int_attributes[i].second) { |
| 754 case AX_BUTTON_STATE_FALSE: |
| 755 result += " pressed_state=false"; |
| 756 break; |
| 757 case AX_BUTTON_STATE_TRUE: |
| 758 result += " pressed_state=true"; |
| 759 break; |
| 760 case AX_BUTTON_STATE_MIXED: |
| 761 result += " pressed_state=mixed"; |
| 762 break; |
| 763 } |
| 764 break; |
| 751 case AX_INT_ATTRIBUTE_NONE: | 765 case AX_INT_ATTRIBUTE_NONE: |
| 752 break; | 766 break; |
| 753 } | 767 } |
| 754 } | 768 } |
| 755 | 769 |
| 756 for (size_t i = 0; i < string_attributes.size(); ++i) { | 770 for (size_t i = 0; i < string_attributes.size(); ++i) { |
| 757 std::string value = string_attributes[i].second; | 771 std::string value = string_attributes[i].second; |
| 758 switch (string_attributes[i].first) { | 772 switch (string_attributes[i].first) { |
| 759 case AX_ATTR_ACCESS_KEY: | 773 case AX_ATTR_ACCESS_KEY: |
| 760 result += " access_key=" + value; | 774 result += " access_key=" + value; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 | 980 |
| 967 result += " actions=" + ActionsBitfieldToString(actions); | 981 result += " actions=" + ActionsBitfieldToString(actions); |
| 968 | 982 |
| 969 if (!child_ids.empty()) | 983 if (!child_ids.empty()) |
| 970 result += " child_ids=" + IntVectorToString(child_ids); | 984 result += " child_ids=" + IntVectorToString(child_ids); |
| 971 | 985 |
| 972 return result; | 986 return result; |
| 973 } | 987 } |
| 974 | 988 |
| 975 } // namespace ui | 989 } // namespace ui |
| OLD | NEW |