| 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 3541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3552 break; | 3552 break; |
| 3553 } | 3553 } |
| 3554 case ui::AX_ROLE_GROW_AREA: | 3554 case ui::AX_ROLE_GROW_AREA: |
| 3555 ia_role_ = ROLE_SYSTEM_GRIP; | 3555 ia_role_ = ROLE_SYSTEM_GRIP; |
| 3556 ia_state_ |= STATE_SYSTEM_READONLY; | 3556 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3557 break; | 3557 break; |
| 3558 case ui::AX_ROLE_HEADING: | 3558 case ui::AX_ROLE_HEADING: |
| 3559 role_name_ = html_tag; | 3559 role_name_ = html_tag; |
| 3560 ia2_role_ = IA2_ROLE_HEADING; | 3560 ia2_role_ = IA2_ROLE_HEADING; |
| 3561 break; | 3561 break; |
| 3562 case ui::AX_ROLE_HORIZONTAL_RULE: | |
| 3563 ia_role_ = ROLE_SYSTEM_SEPARATOR; | |
| 3564 break; | |
| 3565 case ui::AX_ROLE_IFRAME: | 3562 case ui::AX_ROLE_IFRAME: |
| 3566 ia_role_ = ROLE_SYSTEM_DOCUMENT; | 3563 ia_role_ = ROLE_SYSTEM_DOCUMENT; |
| 3567 ia2_role_ = IA2_ROLE_INTERNAL_FRAME; | 3564 ia2_role_ = IA2_ROLE_INTERNAL_FRAME; |
| 3568 ia_state_ = STATE_SYSTEM_READONLY; | 3565 ia_state_ = STATE_SYSTEM_READONLY; |
| 3569 break; | 3566 break; |
| 3570 case ui::AX_ROLE_IMAGE: | 3567 case ui::AX_ROLE_IMAGE: |
| 3571 ia_role_ = ROLE_SYSTEM_GRAPHIC; | 3568 ia_role_ = ROLE_SYSTEM_GRAPHIC; |
| 3572 ia_state_ |= STATE_SYSTEM_READONLY; | 3569 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3573 break; | 3570 break; |
| 3574 case ui::AX_ROLE_IMAGE_MAP: | 3571 case ui::AX_ROLE_IMAGE_MAP: |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3858 // The role should always be set. | 3855 // The role should always be set. |
| 3859 DCHECK(!role_name_.empty() || ia_role_); | 3856 DCHECK(!role_name_.empty() || ia_role_); |
| 3860 | 3857 |
| 3861 // 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 |
| 3862 // as the MSAA role. | 3859 // as the MSAA role. |
| 3863 if (!ia2_role_) | 3860 if (!ia2_role_) |
| 3864 ia2_role_ = ia_role_; | 3861 ia2_role_ = ia_role_; |
| 3865 } | 3862 } |
| 3866 | 3863 |
| 3867 } // namespace content | 3864 } // namespace content |
| OLD | NEW |