| 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/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 3509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3520 case ui::AX_ROLE_FIGURE: | 3520 case ui::AX_ROLE_FIGURE: |
| 3521 role_name_ = html_tag; | 3521 role_name_ = html_tag; |
| 3522 ia_role_ = ROLE_SYSTEM_GROUPING; | 3522 ia_role_ = ROLE_SYSTEM_GROUPING; |
| 3523 ia2_role_ = IA2_ROLE_SECTION; | 3523 ia2_role_ = IA2_ROLE_SECTION; |
| 3524 break; | 3524 break; |
| 3525 case ui::AX_ROLE_FORM: | 3525 case ui::AX_ROLE_FORM: |
| 3526 role_name_ = L"form"; | 3526 role_name_ = L"form"; |
| 3527 ia2_role_ = IA2_ROLE_FORM; | 3527 ia2_role_ = IA2_ROLE_FORM; |
| 3528 break; | 3528 break; |
| 3529 case ui::AX_ROLE_FOOTER: | 3529 case ui::AX_ROLE_FOOTER: |
| 3530 ia_role_ = IA2_ROLE_FOOTER; | 3530 ia_role_ = ROLE_SYSTEM_GROUPING; |
| 3531 ia_state_ |= STATE_SYSTEM_READONLY; | 3531 ia2_role_ = IA2_ROLE_FOOTER; |
| 3532 break; | 3532 break; |
| 3533 case ui::AX_ROLE_GRID: | 3533 case ui::AX_ROLE_GRID: |
| 3534 ia_role_ = ROLE_SYSTEM_TABLE; | 3534 ia_role_ = ROLE_SYSTEM_TABLE; |
| 3535 ia_state_ |= STATE_SYSTEM_READONLY; | 3535 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3536 break; | 3536 break; |
| 3537 case ui::AX_ROLE_GROUP: { | 3537 case ui::AX_ROLE_GROUP: { |
| 3538 base::string16 aria_role = GetString16Attribute( | 3538 base::string16 aria_role = GetString16Attribute( |
| 3539 ui::AX_ATTR_ROLE); | 3539 ui::AX_ATTR_ROLE); |
| 3540 if (aria_role == L"group" || html_tag == L"fieldset") { | 3540 if (aria_role == L"group" || html_tag == L"fieldset") { |
| 3541 ia_role_ = ROLE_SYSTEM_GROUPING; | 3541 ia_role_ = ROLE_SYSTEM_GROUPING; |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3855 // The role should always be set. | 3855 // The role should always be set. |
| 3856 DCHECK(!role_name_.empty() || ia_role_); | 3856 DCHECK(!role_name_.empty() || ia_role_); |
| 3857 | 3857 |
| 3858 // If we didn't explicitly set the IAccessible2 role, make it the same | 3858 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 3859 // as the MSAA role. | 3859 // as the MSAA role. |
| 3860 if (!ia2_role_) | 3860 if (!ia2_role_) |
| 3861 ia2_role_ = ia_role_; | 3861 ia2_role_ = ia_role_; |
| 3862 } | 3862 } |
| 3863 | 3863 |
| 3864 } // namespace content | 3864 } // namespace content |
| OLD | NEW |