Chromium Code Reviews| 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 3405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3416 ia2_role_ = IA2_ROLE_CANVAS; | 3416 ia2_role_ = IA2_ROLE_CANVAS; |
| 3417 } else { | 3417 } else { |
| 3418 ia_role_ = ROLE_SYSTEM_GRAPHIC; | 3418 ia_role_ = ROLE_SYSTEM_GRAPHIC; |
| 3419 } | 3419 } |
| 3420 break; | 3420 break; |
| 3421 case ui::AX_ROLE_CELL: | 3421 case ui::AX_ROLE_CELL: |
| 3422 ia_role_ = ROLE_SYSTEM_CELL; | 3422 ia_role_ = ROLE_SYSTEM_CELL; |
| 3423 break; | 3423 break; |
| 3424 case ui::AX_ROLE_CHECK_BOX: | 3424 case ui::AX_ROLE_CHECK_BOX: |
| 3425 ia_role_ = ROLE_SYSTEM_CHECKBUTTON; | 3425 ia_role_ = ROLE_SYSTEM_CHECKBUTTON; |
| 3426 bool is_aria_checked_defined; | |
| 3427 bool is_mixed_check; | |
| 3428 if (GetAriaTristate("aria-checked", | |
| 3429 &is_aria_checked_defined, &is_mixed_check)) { | |
|
dmazzoni
2014/09/26 18:52:43
nit: indent 4 chars for line continuation
| |
| 3430 ia_state_ = STATE_SYSTEM_CHECKED; | |
|
shreeramk
2014/09/26 19:14:43
I think I made a mistake here in uploading the pat
| |
| 3431 ia2_state_ = IA2_STATE_CHECKABLE; | |
| 3432 if (is_mixed_check) | |
| 3433 ia_state_ = STATE_SYSTEM_MIXED; | |
|
dmazzoni
2014/09/26 18:52:43
This should be an |= to preserve any other state f
| |
| 3434 } | |
| 3426 break; | 3435 break; |
| 3427 case ui::AX_ROLE_COLOR_WELL: | 3436 case ui::AX_ROLE_COLOR_WELL: |
| 3428 ia_role_ = ROLE_SYSTEM_CLIENT; | 3437 ia_role_ = ROLE_SYSTEM_CLIENT; |
| 3429 ia2_role_ = IA2_ROLE_COLOR_CHOOSER; | 3438 ia2_role_ = IA2_ROLE_COLOR_CHOOSER; |
| 3430 break; | 3439 break; |
| 3431 case ui::AX_ROLE_COLUMN: | 3440 case ui::AX_ROLE_COLUMN: |
| 3432 ia_role_ = ROLE_SYSTEM_COLUMN; | 3441 ia_role_ = ROLE_SYSTEM_COLUMN; |
| 3433 ia_state_ |= STATE_SYSTEM_READONLY; | 3442 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3434 break; | 3443 break; |
| 3435 case ui::AX_ROLE_COLUMN_HEADER: | 3444 case ui::AX_ROLE_COLUMN_HEADER: |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3803 // The role should always be set. | 3812 // The role should always be set. |
| 3804 DCHECK(!role_name_.empty() || ia_role_); | 3813 DCHECK(!role_name_.empty() || ia_role_); |
| 3805 | 3814 |
| 3806 // If we didn't explicitly set the IAccessible2 role, make it the same | 3815 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 3807 // as the MSAA role. | 3816 // as the MSAA role. |
| 3808 if (!ia2_role_) | 3817 if (!ia2_role_) |
| 3809 ia2_role_ = ia_role_; | 3818 ia2_role_ = ia_role_; |
| 3810 } | 3819 } |
| 3811 | 3820 |
| 3812 } // namespace content | 3821 } // namespace content |
| OLD | NEW |