| 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 3672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3683 ia_state_ |= STATE_SYSTEM_READONLY; | 3683 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3684 break; | 3684 break; |
| 3685 case ui::AX_ROLE_RADIO_BUTTON: | 3685 case ui::AX_ROLE_RADIO_BUTTON: |
| 3686 ia_role_ = ROLE_SYSTEM_RADIOBUTTON; | 3686 ia_role_ = ROLE_SYSTEM_RADIOBUTTON; |
| 3687 break; | 3687 break; |
| 3688 case ui::AX_ROLE_RADIO_GROUP: | 3688 case ui::AX_ROLE_RADIO_GROUP: |
| 3689 ia_role_ = ROLE_SYSTEM_GROUPING; | 3689 ia_role_ = ROLE_SYSTEM_GROUPING; |
| 3690 ia2_role_ = IA2_ROLE_SECTION; | 3690 ia2_role_ = IA2_ROLE_SECTION; |
| 3691 break; | 3691 break; |
| 3692 case ui::AX_ROLE_REGION: | 3692 case ui::AX_ROLE_REGION: |
| 3693 ia_role_ = ROLE_SYSTEM_GROUPING; | 3693 if (html_tag == L"section") { |
| 3694 ia2_role_ = IA2_ROLE_SECTION; | 3694 ia_role_ = ROLE_SYSTEM_GROUPING; |
| 3695 ia_state_ |= STATE_SYSTEM_READONLY; | 3695 ia2_role_ = IA2_ROLE_SECTION; |
| 3696 } else { |
| 3697 ia_role_ = ROLE_SYSTEM_PANE; |
| 3698 } |
| 3696 break; | 3699 break; |
| 3697 case ui::AX_ROLE_ROW: | 3700 case ui::AX_ROLE_ROW: |
| 3698 ia_role_ = ROLE_SYSTEM_ROW; | 3701 ia_role_ = ROLE_SYSTEM_ROW; |
| 3699 ia_state_ |= STATE_SYSTEM_READONLY; | 3702 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3700 break; | 3703 break; |
| 3701 case ui::AX_ROLE_ROW_HEADER: | 3704 case ui::AX_ROLE_ROW_HEADER: |
| 3702 ia_role_ = ROLE_SYSTEM_ROWHEADER; | 3705 ia_role_ = ROLE_SYSTEM_ROWHEADER; |
| 3703 ia_state_ |= STATE_SYSTEM_READONLY; | 3706 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3704 break; | 3707 break; |
| 3705 case ui::AX_ROLE_RULER: | 3708 case ui::AX_ROLE_RULER: |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3856 // The role should always be set. | 3859 // The role should always be set. |
| 3857 DCHECK(!role_name_.empty() || ia_role_); | 3860 DCHECK(!role_name_.empty() || ia_role_); |
| 3858 | 3861 |
| 3859 // If we didn't explicitly set the IAccessible2 role, make it the same | 3862 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 3860 // as the MSAA role. | 3863 // as the MSAA role. |
| 3861 if (!ia2_role_) | 3864 if (!ia2_role_) |
| 3862 ia2_role_ = ia_role_; | 3865 ia2_role_ = ia_role_; |
| 3863 } | 3866 } |
| 3864 | 3867 |
| 3865 } // namespace content | 3868 } // namespace content |
| OLD | NEW |