| 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.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_ENABLED); |
| 75 | 75 |
| 76 if (o.isVertical()) | 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) |
| 79 state |= (1 << ui::AX_STATE_HORIZONTAL); |
| 78 | 80 |
| 79 if (o.isVisited()) | 81 if (o.isVisited()) |
| 80 state |= (1 << ui::AX_STATE_VISITED); | 82 state |= (1 << ui::AX_STATE_VISITED); |
| 81 | 83 |
| 82 return state; | 84 return state; |
| 83 } | 85 } |
| 84 | 86 |
| 85 ui::AXRole AXRoleFromBlink(blink::WebAXRole role) { | 87 ui::AXRole AXRoleFromBlink(blink::WebAXRole role) { |
| 86 switch (role) { | 88 switch (role) { |
| 87 case blink::WebAXRoleAlert: | 89 case blink::WebAXRoleAlert: |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 case blink::WebAXTextDirectionBT: | 394 case blink::WebAXTextDirectionBT: |
| 393 return ui::AX_TEXT_DIRECTION_BT; | 395 return ui::AX_TEXT_DIRECTION_BT; |
| 394 default: | 396 default: |
| 395 NOTREACHED(); | 397 NOTREACHED(); |
| 396 } | 398 } |
| 397 | 399 |
| 398 return ui::AX_TEXT_DIRECTION_NONE; | 400 return ui::AX_TEXT_DIRECTION_NONE; |
| 399 } | 401 } |
| 400 | 402 |
| 401 } // namespace content | 403 } // namespace content |
| OLD | NEW |