| 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 <algorithm> | 10 #include <algorithm> |
| (...skipping 4231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4242 if (HasState(ui::AX_STATE_CHECKED)) | 4242 if (HasState(ui::AX_STATE_CHECKED)) |
| 4243 ia_state |= STATE_SYSTEM_CHECKED; | 4243 ia_state |= STATE_SYSTEM_CHECKED; |
| 4244 if (HasState(ui::AX_STATE_COLLAPSED)) | 4244 if (HasState(ui::AX_STATE_COLLAPSED)) |
| 4245 ia_state |= STATE_SYSTEM_COLLAPSED; | 4245 ia_state |= STATE_SYSTEM_COLLAPSED; |
| 4246 if (HasState(ui::AX_STATE_EXPANDED)) | 4246 if (HasState(ui::AX_STATE_EXPANDED)) |
| 4247 ia_state |= STATE_SYSTEM_EXPANDED; | 4247 ia_state |= STATE_SYSTEM_EXPANDED; |
| 4248 if (HasState(ui::AX_STATE_FOCUSABLE)) | 4248 if (HasState(ui::AX_STATE_FOCUSABLE)) |
| 4249 ia_state |= STATE_SYSTEM_FOCUSABLE; | 4249 ia_state |= STATE_SYSTEM_FOCUSABLE; |
| 4250 if (HasState(ui::AX_STATE_HASPOPUP)) | 4250 if (HasState(ui::AX_STATE_HASPOPUP)) |
| 4251 ia_state |= STATE_SYSTEM_HASPOPUP; | 4251 ia_state |= STATE_SYSTEM_HASPOPUP; |
| 4252 if (HasState(ui::AX_STATE_INDETERMINATE)) | |
| 4253 ia_state |= STATE_SYSTEM_INDETERMINATE; | |
| 4254 if (HasIntAttribute(ui::AX_ATTR_INVALID_STATE) && | 4252 if (HasIntAttribute(ui::AX_ATTR_INVALID_STATE) && |
| 4255 GetIntAttribute(ui::AX_ATTR_INVALID_STATE) != ui::AX_INVALID_STATE_FALSE) | 4253 GetIntAttribute(ui::AX_ATTR_INVALID_STATE) != ui::AX_INVALID_STATE_FALSE) |
| 4256 ia2_state |= IA2_STATE_INVALID_ENTRY; | 4254 ia2_state |= IA2_STATE_INVALID_ENTRY; |
| 4257 if (HasState(ui::AX_STATE_INVISIBLE)) | 4255 if (HasState(ui::AX_STATE_INVISIBLE)) |
| 4258 ia_state |= STATE_SYSTEM_INVISIBLE; | 4256 ia_state |= STATE_SYSTEM_INVISIBLE; |
| 4259 if (HasState(ui::AX_STATE_LINKED)) | 4257 if (HasState(ui::AX_STATE_LINKED)) |
| 4260 ia_state |= STATE_SYSTEM_LINKED; | 4258 ia_state |= STATE_SYSTEM_LINKED; |
| 4261 if (HasState(ui::AX_STATE_MULTISELECTABLE)) { | 4259 if (HasState(ui::AX_STATE_MULTISELECTABLE)) { |
| 4262 ia_state |= STATE_SYSTEM_EXTSELECTABLE; | 4260 ia_state |= STATE_SYSTEM_EXTSELECTABLE; |
| 4263 ia_state |= STATE_SYSTEM_MULTISELECTABLE; | 4261 ia_state |= STATE_SYSTEM_MULTISELECTABLE; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 4292 BrowserAccessibilityStateImpl* accessibility_state = | 4290 BrowserAccessibilityStateImpl* accessibility_state = |
| 4293 BrowserAccessibilityStateImpl::GetInstance(); | 4291 BrowserAccessibilityStateImpl::GetInstance(); |
| 4294 if (!accessibility_state->disable_hot_tracking_for_testing()) { | 4292 if (!accessibility_state->disable_hot_tracking_for_testing()) { |
| 4295 if (HasState(ui::AX_STATE_HOVERED)) | 4293 if (HasState(ui::AX_STATE_HOVERED)) |
| 4296 ia_state |= STATE_SYSTEM_HOTTRACKED; | 4294 ia_state |= STATE_SYSTEM_HOTTRACKED; |
| 4297 } | 4295 } |
| 4298 | 4296 |
| 4299 if (IsEditableText()) | 4297 if (IsEditableText()) |
| 4300 ia2_state |= IA2_STATE_EDITABLE; | 4298 ia2_state |= IA2_STATE_EDITABLE; |
| 4301 | 4299 |
| 4302 if (GetBoolAttribute(ui::AX_ATTR_BUTTON_MIXED)) | 4300 if (GetBoolAttribute(ui::AX_ATTR_STATE_MIXED)) |
| 4303 ia_state |= STATE_SYSTEM_MIXED; | 4301 ia_state |= STATE_SYSTEM_MIXED; |
| 4304 | 4302 |
| 4305 if (GetBoolAttribute(ui::AX_ATTR_CAN_SET_VALUE)) | 4303 if (GetBoolAttribute(ui::AX_ATTR_CAN_SET_VALUE)) |
| 4306 ia2_state |= IA2_STATE_EDITABLE; | 4304 ia2_state |= IA2_STATE_EDITABLE; |
| 4307 | 4305 |
| 4308 if (!GetStringAttribute(ui::AX_ATTR_AUTO_COMPLETE).empty()) | 4306 if (!GetStringAttribute(ui::AX_ATTR_AUTO_COMPLETE).empty()) |
| 4309 ia2_state |= IA2_STATE_SUPPORTS_AUTOCOMPLETION; | 4307 ia2_state |= IA2_STATE_SUPPORTS_AUTOCOMPLETION; |
| 4310 | 4308 |
| 4311 base::string16 html_tag = GetString16Attribute( | 4309 base::string16 html_tag = GetString16Attribute( |
| 4312 ui::AX_ATTR_HTML_TAG); | 4310 ui::AX_ATTR_HTML_TAG); |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4779 ia2_role = ia_role; | 4777 ia2_role = ia_role; |
| 4780 | 4778 |
| 4781 win_attributes_->ia_role = ia_role; | 4779 win_attributes_->ia_role = ia_role; |
| 4782 win_attributes_->ia_state = ia_state; | 4780 win_attributes_->ia_state = ia_state; |
| 4783 win_attributes_->role_name = role_name; | 4781 win_attributes_->role_name = role_name; |
| 4784 win_attributes_->ia2_role = ia2_role; | 4782 win_attributes_->ia2_role = ia2_role; |
| 4785 win_attributes_->ia2_state = ia2_state; | 4783 win_attributes_->ia2_state = ia2_state; |
| 4786 } | 4784 } |
| 4787 | 4785 |
| 4788 } // namespace content | 4786 } // namespace content |
| OLD | NEW |