OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/renderer/accessibility/blink_ax_enum_conversion.h" | 5 #include "content/renderer/accessibility/blink_ax_enum_conversion.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 if (o.isReadOnly()) | 61 if (o.isReadOnly()) |
62 state |= (1 << ui::AX_STATE_READ_ONLY); | 62 state |= (1 << ui::AX_STATE_READ_ONLY); |
63 | 63 |
64 if (o.isRequired()) | 64 if (o.isRequired()) |
65 state |= (1 << ui::AX_STATE_REQUIRED); | 65 state |= (1 << ui::AX_STATE_REQUIRED); |
66 | 66 |
67 if (o.canSetSelectedAttribute()) | 67 if (o.canSetSelectedAttribute()) |
68 state |= (1 << ui::AX_STATE_SELECTABLE); | 68 state |= (1 << ui::AX_STATE_SELECTABLE); |
69 | 69 |
| 70 if (o.isEditable()) |
| 71 state |= (1 << ui::AX_STATE_EDITABLE); |
| 72 |
| 73 if (o.isEnabled()) |
| 74 state |= (1 << ui::AX_STATE_ENABLED); |
| 75 |
70 if (o.isSelected()) | 76 if (o.isSelected()) |
71 state |= (1 << ui::AX_STATE_SELECTED); | 77 state |= (1 << ui::AX_STATE_SELECTED); |
72 | 78 |
| 79 if (o.isRichlyEditable()) |
| 80 state |= (1 << ui::AX_STATE_RICHLY_EDITABLE); |
| 81 |
73 if (o.isVisited()) | 82 if (o.isVisited()) |
74 state |= (1 << ui::AX_STATE_VISITED); | 83 state |= (1 << ui::AX_STATE_VISITED); |
75 | 84 |
76 if (o.isEnabled()) | |
77 state |= (1 << ui::AX_STATE_ENABLED); | |
78 | |
79 if (o.orientation() == blink::WebAXOrientationVertical) | 85 if (o.orientation() == blink::WebAXOrientationVertical) |
80 state |= (1 << ui::AX_STATE_VERTICAL); | 86 state |= (1 << ui::AX_STATE_VERTICAL); |
81 else if (o.orientation() == blink::WebAXOrientationHorizontal) | 87 else if (o.orientation() == blink::WebAXOrientationHorizontal) |
82 state |= (1 << ui::AX_STATE_HORIZONTAL); | 88 state |= (1 << ui::AX_STATE_HORIZONTAL); |
83 | 89 |
84 if (o.isVisited()) | 90 if (o.isVisited()) |
85 state |= (1 << ui::AX_STATE_VISITED); | 91 state |= (1 << ui::AX_STATE_VISITED); |
86 | 92 |
87 return state; | 93 return state; |
88 } | 94 } |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 case blink::WebAXSortDirectionOther: | 466 case blink::WebAXSortDirectionOther: |
461 return ui::AX_SORT_DIRECTION_OTHER; | 467 return ui::AX_SORT_DIRECTION_OTHER; |
462 default: | 468 default: |
463 NOTREACHED(); | 469 NOTREACHED(); |
464 } | 470 } |
465 | 471 |
466 return ui::AX_SORT_DIRECTION_NONE; | 472 return ui::AX_SORT_DIRECTION_NONE; |
467 } | 473 } |
468 | 474 |
469 } // Namespace content. | 475 } // Namespace content. |
OLD | NEW |