| 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 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3349 if (HasState(ui::AX_STATE_PROTECTED)) | 3349 if (HasState(ui::AX_STATE_PROTECTED)) |
| 3350 ia_state_ |= STATE_SYSTEM_PROTECTED; | 3350 ia_state_ |= STATE_SYSTEM_PROTECTED; |
| 3351 if (HasState(ui::AX_STATE_REQUIRED)) | 3351 if (HasState(ui::AX_STATE_REQUIRED)) |
| 3352 ia2_state_ |= IA2_STATE_REQUIRED; | 3352 ia2_state_ |= IA2_STATE_REQUIRED; |
| 3353 if (HasState(ui::AX_STATE_SELECTABLE)) | 3353 if (HasState(ui::AX_STATE_SELECTABLE)) |
| 3354 ia_state_ |= STATE_SYSTEM_SELECTABLE; | 3354 ia_state_ |= STATE_SYSTEM_SELECTABLE; |
| 3355 if (HasState(ui::AX_STATE_SELECTED)) | 3355 if (HasState(ui::AX_STATE_SELECTED)) |
| 3356 ia_state_ |= STATE_SYSTEM_SELECTED; | 3356 ia_state_ |= STATE_SYSTEM_SELECTED; |
| 3357 if (HasState(ui::AX_STATE_VISITED)) | 3357 if (HasState(ui::AX_STATE_VISITED)) |
| 3358 ia_state_ |= STATE_SYSTEM_TRAVERSED; | 3358 ia_state_ |= STATE_SYSTEM_TRAVERSED; |
| 3359 if (!HasState(ui::AX_STATE_ENABLED)) | 3359 if (HasState(ui::AX_STATE_DISABLED)) |
| 3360 ia_state_ |= STATE_SYSTEM_UNAVAILABLE; | 3360 ia_state_ |= STATE_SYSTEM_UNAVAILABLE; |
| 3361 if (HasState(ui::AX_STATE_VERTICAL)) | 3361 if (HasState(ui::AX_STATE_VERTICAL)) |
| 3362 ia2_state_ |= IA2_STATE_VERTICAL; | 3362 ia2_state_ |= IA2_STATE_VERTICAL; |
| 3363 if (HasState(ui::AX_STATE_HORIZONTAL)) | 3363 if (HasState(ui::AX_STATE_HORIZONTAL)) |
| 3364 ia2_state_ |= IA2_STATE_HORIZONTAL; | 3364 ia2_state_ |= IA2_STATE_HORIZONTAL; |
| 3365 if (HasState(ui::AX_STATE_VISITED)) | 3365 if (HasState(ui::AX_STATE_VISITED)) |
| 3366 ia_state_ |= STATE_SYSTEM_TRAVERSED; | 3366 ia_state_ |= STATE_SYSTEM_TRAVERSED; |
| 3367 | 3367 |
| 3368 // WebKit marks everything as readonly unless it's editable text, so if it's | 3368 // WebKit marks everything as readonly unless it's editable text, so if it's |
| 3369 // not readonly, mark it as editable now. The final computation of the | 3369 // not readonly, mark it as editable now. The final computation of the |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3834 // The role should always be set. | 3834 // The role should always be set. |
| 3835 DCHECK(!role_name_.empty() || ia_role_); | 3835 DCHECK(!role_name_.empty() || ia_role_); |
| 3836 | 3836 |
| 3837 // If we didn't explicitly set the IAccessible2 role, make it the same | 3837 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 3838 // as the MSAA role. | 3838 // as the MSAA role. |
| 3839 if (!ia2_role_) | 3839 if (!ia2_role_) |
| 3840 ia2_role_ = ia_role_; | 3840 ia2_role_ = ia_role_; |
| 3841 } | 3841 } |
| 3842 | 3842 |
| 3843 } // namespace content | 3843 } // namespace content |
| OLD | NEW |