| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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.isSelected()) | 70 if (o.isSelected()) |
| 71 state |= (1 << ui::AX_STATE_SELECTED); | 71 state |= (1 << ui::AX_STATE_SELECTED); |
| 72 | 72 |
| 73 if (o.isVisited()) | 73 if (o.isVisited()) |
| 74 state |= (1 << ui::AX_STATE_VISITED); | 74 state |= (1 << ui::AX_STATE_VISITED); |
| 75 | 75 |
| 76 if (o.isEnabled()) | 76 if (!o.isEnabled()) |
| 77 state |= (1 << ui::AX_STATE_ENABLED); | 77 state |= (1 << ui::AX_STATE_DISABLED); |
| 78 | 78 |
| 79 if (o.orientation() == blink::WebAXOrientationVertical) | 79 if (o.orientation() == blink::WebAXOrientationVertical) |
| 80 state |= (1 << ui::AX_STATE_VERTICAL); | 80 state |= (1 << ui::AX_STATE_VERTICAL); |
| 81 else if (o.orientation() == blink::WebAXOrientationHorizontal) | 81 else if (o.orientation() == blink::WebAXOrientationHorizontal) |
| 82 state |= (1 << ui::AX_STATE_HORIZONTAL); | 82 state |= (1 << ui::AX_STATE_HORIZONTAL); |
| 83 | 83 |
| 84 if (o.isVisited()) | 84 if (o.isVisited()) |
| 85 state |= (1 << ui::AX_STATE_VISITED); | 85 state |= (1 << ui::AX_STATE_VISITED); |
| 86 | 86 |
| 87 return state; | 87 return state; |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 case blink::WebAXSortDirectionOther: | 441 case blink::WebAXSortDirectionOther: |
| 442 return ui::AX_SORT_DIRECTION_OTHER; | 442 return ui::AX_SORT_DIRECTION_OTHER; |
| 443 default: | 443 default: |
| 444 NOTREACHED(); | 444 NOTREACHED(); |
| 445 } | 445 } |
| 446 | 446 |
| 447 return ui::AX_SORT_DIRECTION_NONE; | 447 return ui::AX_SORT_DIRECTION_NONE; |
| 448 } | 448 } |
| 449 | 449 |
| 450 } // Namespace content. | 450 } // Namespace content. |
| OLD | NEW |