OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/accessibility/browser_accessibility_win.h" | 5 #include "content/browser/accessibility/browser_accessibility_win.h" |
6 | 6 |
7 #include <UIAutomationClient.h> | 7 #include <UIAutomationClient.h> |
8 #include <UIAutomationCoreApi.h> | 8 #include <UIAutomationCoreApi.h> |
9 | 9 |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 3091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3102 case WebAccessibility::ROLE_WEB_AREA: | 3102 case WebAccessibility::ROLE_WEB_AREA: |
3103 ia_role_ = ROLE_SYSTEM_DOCUMENT; | 3103 ia_role_ = ROLE_SYSTEM_DOCUMENT; |
3104 ia_state_|= STATE_SYSTEM_READONLY; | 3104 ia_state_|= STATE_SYSTEM_READONLY; |
3105 ia_state_|= STATE_SYSTEM_FOCUSABLE; | 3105 ia_state_|= STATE_SYSTEM_FOCUSABLE; |
3106 break; | 3106 break; |
3107 case WebAccessibility::ROLE_EDITABLE_TEXT: | 3107 case WebAccessibility::ROLE_EDITABLE_TEXT: |
3108 ia_role_ = ROLE_SYSTEM_TEXT; | 3108 ia_role_ = ROLE_SYSTEM_TEXT; |
3109 ia2_state_ |= IA2_STATE_SINGLE_LINE; | 3109 ia2_state_ |= IA2_STATE_SINGLE_LINE; |
3110 ia2_state_ |= IA2_STATE_EDITABLE; | 3110 ia2_state_ |= IA2_STATE_EDITABLE; |
3111 break; | 3111 break; |
| 3112 case WebAccessibility::ROLE_FOOTER: |
| 3113 ia_role_ = IA2_ROLE_FOOTER; |
| 3114 ia_state_|= STATE_SYSTEM_READONLY; |
| 3115 break; |
3112 case WebAccessibility::ROLE_GRID: | 3116 case WebAccessibility::ROLE_GRID: |
3113 ia_role_ = ROLE_SYSTEM_TABLE; | 3117 ia_role_ = ROLE_SYSTEM_TABLE; |
3114 ia_state_|= STATE_SYSTEM_READONLY; | 3118 ia_state_|= STATE_SYSTEM_READONLY; |
3115 break; | 3119 break; |
3116 case WebAccessibility::ROLE_GROUP: { | 3120 case WebAccessibility::ROLE_GROUP: { |
3117 string16 aria_role; | 3121 string16 aria_role; |
3118 GetStringAttribute(WebAccessibility::ATTR_ROLE, &aria_role); | 3122 GetStringAttribute(WebAccessibility::ATTR_ROLE, &aria_role); |
3119 if (aria_role == L"group" || html_tag == L"fieldset") { | 3123 if (aria_role == L"group" || html_tag == L"fieldset") { |
3120 ia_role_ = ROLE_SYSTEM_GROUPING; | 3124 ia_role_ = ROLE_SYSTEM_GROUPING; |
3121 } else if (html_tag == L"li") { | 3125 } else if (html_tag == L"li") { |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3372 } | 3376 } |
3373 | 3377 |
3374 // The role should always be set. | 3378 // The role should always be set. |
3375 DCHECK(!role_name_.empty() || ia_role_); | 3379 DCHECK(!role_name_.empty() || ia_role_); |
3376 | 3380 |
3377 // If we didn't explicitly set the IAccessible2 role, make it the same | 3381 // If we didn't explicitly set the IAccessible2 role, make it the same |
3378 // as the MSAA role. | 3382 // as the MSAA role. |
3379 if (!ia2_role_) | 3383 if (!ia2_role_) |
3380 ia2_role_ = ia_role_; | 3384 ia2_role_ = ia_role_; |
3381 } | 3385 } |
OLD | NEW |