| 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 3500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3511 case ui::AX_ROLE_EDITABLE_TEXT: | 3511 case ui::AX_ROLE_EDITABLE_TEXT: |
| 3512 ia_role_ = ROLE_SYSTEM_TEXT; | 3512 ia_role_ = ROLE_SYSTEM_TEXT; |
| 3513 ia2_state_ |= IA2_STATE_SINGLE_LINE; | 3513 ia2_state_ |= IA2_STATE_SINGLE_LINE; |
| 3514 ia2_state_ |= IA2_STATE_EDITABLE; | 3514 ia2_state_ |= IA2_STATE_EDITABLE; |
| 3515 break; | 3515 break; |
| 3516 case ui::AX_ROLE_FIGCAPTION: | 3516 case ui::AX_ROLE_FIGCAPTION: |
| 3517 role_name_ = html_tag; | 3517 role_name_ = html_tag; |
| 3518 ia2_role_ = IA2_ROLE_CAPTION; | 3518 ia2_role_ = IA2_ROLE_CAPTION; |
| 3519 break; | 3519 break; |
| 3520 case ui::AX_ROLE_FIGURE: | 3520 case ui::AX_ROLE_FIGURE: |
| 3521 role_name_ = html_tag; | |
| 3522 ia_role_ = ROLE_SYSTEM_GROUPING; | 3521 ia_role_ = ROLE_SYSTEM_GROUPING; |
| 3523 ia2_role_ = IA2_ROLE_SECTION; | |
| 3524 break; | 3522 break; |
| 3525 case ui::AX_ROLE_FORM: | 3523 case ui::AX_ROLE_FORM: |
| 3526 role_name_ = L"form"; | 3524 role_name_ = L"form"; |
| 3527 ia2_role_ = IA2_ROLE_FORM; | 3525 ia2_role_ = IA2_ROLE_FORM; |
| 3528 break; | 3526 break; |
| 3529 case ui::AX_ROLE_FOOTER: | 3527 case ui::AX_ROLE_FOOTER: |
| 3530 ia_role_ = IA2_ROLE_FOOTER; | 3528 ia_role_ = IA2_ROLE_FOOTER; |
| 3531 ia_state_ |= STATE_SYSTEM_READONLY; | 3529 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3532 break; | 3530 break; |
| 3533 case ui::AX_ROLE_GRID: | 3531 case ui::AX_ROLE_GRID: |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3855 // The role should always be set. | 3853 // The role should always be set. |
| 3856 DCHECK(!role_name_.empty() || ia_role_); | 3854 DCHECK(!role_name_.empty() || ia_role_); |
| 3857 | 3855 |
| 3858 // If we didn't explicitly set the IAccessible2 role, make it the same | 3856 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 3859 // as the MSAA role. | 3857 // as the MSAA role. |
| 3860 if (!ia2_role_) | 3858 if (!ia2_role_) |
| 3861 ia2_role_ = ia_role_; | 3859 ia2_role_ = ia_role_; |
| 3862 } | 3860 } |
| 3863 | 3861 |
| 3864 } // namespace content | 3862 } // namespace content |
| OLD | NEW |