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 3439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3450 break; | 3450 break; |
3451 case ui::AX_ROLE_DESCRIPTION_LIST_DETAIL: | 3451 case ui::AX_ROLE_DESCRIPTION_LIST_DETAIL: |
3452 role_name_ = html_tag; | 3452 role_name_ = html_tag; |
3453 ia2_role_ = IA2_ROLE_PARAGRAPH; | 3453 ia2_role_ = IA2_ROLE_PARAGRAPH; |
3454 ia_state_ |= STATE_SYSTEM_READONLY; | 3454 ia_state_ |= STATE_SYSTEM_READONLY; |
3455 break; | 3455 break; |
3456 case ui::AX_ROLE_DESCRIPTION_LIST_TERM: | 3456 case ui::AX_ROLE_DESCRIPTION_LIST_TERM: |
3457 ia_role_ = ROLE_SYSTEM_LISTITEM; | 3457 ia_role_ = ROLE_SYSTEM_LISTITEM; |
3458 ia_state_ |= STATE_SYSTEM_READONLY; | 3458 ia_state_ |= STATE_SYSTEM_READONLY; |
3459 break; | 3459 break; |
| 3460 case ui::AX_ROLE_DETAILS: |
| 3461 ia_role_ = ROLE_SYSTEM_GROUPING; |
| 3462 break; |
3460 case ui::AX_ROLE_DIALOG: | 3463 case ui::AX_ROLE_DIALOG: |
3461 ia_role_ = ROLE_SYSTEM_DIALOG; | 3464 ia_role_ = ROLE_SYSTEM_DIALOG; |
3462 ia_state_ |= STATE_SYSTEM_READONLY; | 3465 ia_state_ |= STATE_SYSTEM_READONLY; |
3463 break; | 3466 break; |
3464 case ui::AX_ROLE_DISCLOSURE_TRIANGLE: | 3467 case ui::AX_ROLE_DISCLOSURE_TRIANGLE: |
3465 ia_role_ = ROLE_SYSTEM_OUTLINEBUTTON; | 3468 ia_role_ = ROLE_SYSTEM_OUTLINEBUTTON; |
3466 ia_state_ |= STATE_SYSTEM_READONLY; | 3469 ia_state_ |= STATE_SYSTEM_READONLY; |
3467 break; | 3470 break; |
3468 case ui::AX_ROLE_DOCUMENT: | 3471 case ui::AX_ROLE_DOCUMENT: |
3469 case ui::AX_ROLE_ROOT_WEB_AREA: | 3472 case ui::AX_ROLE_ROOT_WEB_AREA: |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3802 // The role should always be set. | 3805 // The role should always be set. |
3803 DCHECK(!role_name_.empty() || ia_role_); | 3806 DCHECK(!role_name_.empty() || ia_role_); |
3804 | 3807 |
3805 // If we didn't explicitly set the IAccessible2 role, make it the same | 3808 // If we didn't explicitly set the IAccessible2 role, make it the same |
3806 // as the MSAA role. | 3809 // as the MSAA role. |
3807 if (!ia2_role_) | 3810 if (!ia2_role_) |
3808 ia2_role_ = ia_role_; | 3811 ia2_role_ = ia_role_; |
3809 } | 3812 } |
3810 | 3813 |
3811 } // namespace content | 3814 } // namespace content |
OLD | NEW |