| 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 3459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3470 case ui::AX_ROLE_WEB_AREA: | 3470 case ui::AX_ROLE_WEB_AREA: |
| 3471 ia_role_ = ROLE_SYSTEM_DOCUMENT; | 3471 ia_role_ = ROLE_SYSTEM_DOCUMENT; |
| 3472 ia_state_ |= STATE_SYSTEM_READONLY; | 3472 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3473 ia_state_ |= STATE_SYSTEM_FOCUSABLE; | 3473 ia_state_ |= STATE_SYSTEM_FOCUSABLE; |
| 3474 break; | 3474 break; |
| 3475 case ui::AX_ROLE_EDITABLE_TEXT: | 3475 case ui::AX_ROLE_EDITABLE_TEXT: |
| 3476 ia_role_ = ROLE_SYSTEM_TEXT; | 3476 ia_role_ = ROLE_SYSTEM_TEXT; |
| 3477 ia2_state_ |= IA2_STATE_SINGLE_LINE; | 3477 ia2_state_ |= IA2_STATE_SINGLE_LINE; |
| 3478 ia2_state_ |= IA2_STATE_EDITABLE; | 3478 ia2_state_ |= IA2_STATE_EDITABLE; |
| 3479 break; | 3479 break; |
| 3480 case ui::AX_ROLE_FIGCAPTION: |
| 3481 role_name_ = html_tag; |
| 3482 ia2_role_ = IA2_ROLE_CAPTION; |
| 3483 break; |
| 3480 case ui::AX_ROLE_FIGURE: | 3484 case ui::AX_ROLE_FIGURE: |
| 3481 role_name_ = html_tag; | 3485 role_name_ = html_tag; |
| 3482 ia_role_ = ROLE_SYSTEM_GROUPING; | 3486 ia_role_ = ROLE_SYSTEM_GROUPING; |
| 3483 ia2_role_ = IA2_ROLE_SECTION; | 3487 ia2_role_ = IA2_ROLE_SECTION; |
| 3484 break; | 3488 break; |
| 3485 case ui::AX_ROLE_FORM: | 3489 case ui::AX_ROLE_FORM: |
| 3486 role_name_ = L"form"; | 3490 role_name_ = L"form"; |
| 3487 ia2_role_ = IA2_ROLE_FORM; | 3491 ia2_role_ = IA2_ROLE_FORM; |
| 3488 break; | 3492 break; |
| 3489 case ui::AX_ROLE_FOOTER: | 3493 case ui::AX_ROLE_FOOTER: |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3798 // The role should always be set. | 3802 // The role should always be set. |
| 3799 DCHECK(!role_name_.empty() || ia_role_); | 3803 DCHECK(!role_name_.empty() || ia_role_); |
| 3800 | 3804 |
| 3801 // If we didn't explicitly set the IAccessible2 role, make it the same | 3805 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 3802 // as the MSAA role. | 3806 // as the MSAA role. |
| 3803 if (!ia2_role_) | 3807 if (!ia2_role_) |
| 3804 ia2_role_ = ia_role_; | 3808 ia2_role_ = ia_role_; |
| 3805 } | 3809 } |
| 3806 | 3810 |
| 3807 } // namespace content | 3811 } // namespace content |
| OLD | NEW |