| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 if (o.canSetSelectedAttribute()) | 64 if (o.canSetSelectedAttribute()) |
| 65 state |= (1 << ui::AX_STATE_SELECTABLE); | 65 state |= (1 << ui::AX_STATE_SELECTABLE); |
| 66 | 66 |
| 67 if (o.isSelected()) | 67 if (o.isSelected()) |
| 68 state |= (1 << ui::AX_STATE_SELECTED); | 68 state |= (1 << ui::AX_STATE_SELECTED); |
| 69 | 69 |
| 70 if (o.isVisited()) | 70 if (o.isVisited()) |
| 71 state |= (1 << ui::AX_STATE_VISITED); | 71 state |= (1 << ui::AX_STATE_VISITED); |
| 72 | 72 |
| 73 if (o.isEnabled()) | 73 if (!o.isEnabled()) |
| 74 state |= (1 << ui::AX_STATE_ENABLED); | 74 state |= (1 << ui::AX_STATE_DISABLED); |
| 75 | 75 |
| 76 if (o.orientation() == blink::WebAXOrientationVertical) | 76 if (o.orientation() == blink::WebAXOrientationVertical) |
| 77 state |= (1 << ui::AX_STATE_VERTICAL); | 77 state |= (1 << ui::AX_STATE_VERTICAL); |
| 78 else if (o.orientation() == blink::WebAXOrientationHorizontal) | 78 else if (o.orientation() == blink::WebAXOrientationHorizontal) |
| 79 state |= (1 << ui::AX_STATE_HORIZONTAL); | 79 state |= (1 << ui::AX_STATE_HORIZONTAL); |
| 80 | 80 |
| 81 if (o.isVisited()) | 81 if (o.isVisited()) |
| 82 state |= (1 << ui::AX_STATE_VISITED); | 82 state |= (1 << ui::AX_STATE_VISITED); |
| 83 | 83 |
| 84 return state; | 84 return state; |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 case blink::WebAXTextDirectionBT: | 388 case blink::WebAXTextDirectionBT: |
| 389 return ui::AX_TEXT_DIRECTION_BT; | 389 return ui::AX_TEXT_DIRECTION_BT; |
| 390 default: | 390 default: |
| 391 NOTREACHED(); | 391 NOTREACHED(); |
| 392 } | 392 } |
| 393 | 393 |
| 394 return ui::AX_TEXT_DIRECTION_NONE; | 394 return ui::AX_TEXT_DIRECTION_NONE; |
| 395 } | 395 } |
| 396 | 396 |
| 397 } // namespace content | 397 } // namespace content |
| OLD | NEW |