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 3669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3680 ia_state_ |= STATE_SYSTEM_READONLY; | 3680 ia_state_ |= STATE_SYSTEM_READONLY; |
3681 break; | 3681 break; |
3682 case ui::AX_ROLE_RADIO_BUTTON: | 3682 case ui::AX_ROLE_RADIO_BUTTON: |
3683 ia_role_ = ROLE_SYSTEM_RADIOBUTTON; | 3683 ia_role_ = ROLE_SYSTEM_RADIOBUTTON; |
3684 break; | 3684 break; |
3685 case ui::AX_ROLE_RADIO_GROUP: | 3685 case ui::AX_ROLE_RADIO_GROUP: |
3686 ia_role_ = ROLE_SYSTEM_GROUPING; | 3686 ia_role_ = ROLE_SYSTEM_GROUPING; |
3687 ia2_role_ = IA2_ROLE_SECTION; | 3687 ia2_role_ = IA2_ROLE_SECTION; |
3688 break; | 3688 break; |
3689 case ui::AX_ROLE_REGION: | 3689 case ui::AX_ROLE_REGION: |
3690 ia_role_ = ROLE_SYSTEM_GROUPING; | 3690 if (html_tag == L"section") { |
3691 ia2_role_ = IA2_ROLE_SECTION; | 3691 ia_role_ = ROLE_SYSTEM_GROUPING; |
3692 ia_state_ |= STATE_SYSTEM_READONLY; | 3692 ia2_role_ = IA2_ROLE_SECTION; |
3693 } | |
3694 ia_role_ = ROLE_SYSTEM_PANE; | |
dmazzoni
2014/10/20 16:33:23
I still think we need an "else" here
| |
3693 break; | 3695 break; |
3694 case ui::AX_ROLE_ROW: | 3696 case ui::AX_ROLE_ROW: |
3695 ia_role_ = ROLE_SYSTEM_ROW; | 3697 ia_role_ = ROLE_SYSTEM_ROW; |
3696 ia_state_ |= STATE_SYSTEM_READONLY; | 3698 ia_state_ |= STATE_SYSTEM_READONLY; |
3697 break; | 3699 break; |
3698 case ui::AX_ROLE_ROW_HEADER: | 3700 case ui::AX_ROLE_ROW_HEADER: |
3699 ia_role_ = ROLE_SYSTEM_ROWHEADER; | 3701 ia_role_ = ROLE_SYSTEM_ROWHEADER; |
3700 ia_state_ |= STATE_SYSTEM_READONLY; | 3702 ia_state_ |= STATE_SYSTEM_READONLY; |
3701 break; | 3703 break; |
3702 case ui::AX_ROLE_RULER: | 3704 case ui::AX_ROLE_RULER: |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3853 // The role should always be set. | 3855 // The role should always be set. |
3854 DCHECK(!role_name_.empty() || ia_role_); | 3856 DCHECK(!role_name_.empty() || ia_role_); |
3855 | 3857 |
3856 // 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 |
3857 // as the MSAA role. | 3859 // as the MSAA role. |
3858 if (!ia2_role_) | 3860 if (!ia2_role_) |
3859 ia2_role_ = ia_role_; | 3861 ia2_role_ = ia_role_; |
3860 } | 3862 } |
3861 | 3863 |
3862 } // namespace content | 3864 } // namespace content |
OLD | NEW |