Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 1488893002: Stops using SYSTEM_STATE_INDETERMINATE as it makes radio buttons appear to have a mixed state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a few test expectations. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 4142 matching lines...) Expand 10 before | Expand all | Expand 10 after
4153 if (HasState(ui::AX_STATE_CHECKED)) 4153 if (HasState(ui::AX_STATE_CHECKED))
4154 ia_state |= STATE_SYSTEM_CHECKED; 4154 ia_state |= STATE_SYSTEM_CHECKED;
4155 if (HasState(ui::AX_STATE_COLLAPSED)) 4155 if (HasState(ui::AX_STATE_COLLAPSED))
4156 ia_state |= STATE_SYSTEM_COLLAPSED; 4156 ia_state |= STATE_SYSTEM_COLLAPSED;
4157 if (HasState(ui::AX_STATE_EXPANDED)) 4157 if (HasState(ui::AX_STATE_EXPANDED))
4158 ia_state |= STATE_SYSTEM_EXPANDED; 4158 ia_state |= STATE_SYSTEM_EXPANDED;
4159 if (HasState(ui::AX_STATE_FOCUSABLE)) 4159 if (HasState(ui::AX_STATE_FOCUSABLE))
4160 ia_state |= STATE_SYSTEM_FOCUSABLE; 4160 ia_state |= STATE_SYSTEM_FOCUSABLE;
4161 if (HasState(ui::AX_STATE_HASPOPUP)) 4161 if (HasState(ui::AX_STATE_HASPOPUP))
4162 ia_state |= STATE_SYSTEM_HASPOPUP; 4162 ia_state |= STATE_SYSTEM_HASPOPUP;
4163 if (HasState(ui::AX_STATE_INDETERMINATE))
4164 ia_state |= STATE_SYSTEM_INDETERMINATE;
4165 if (HasIntAttribute(ui::AX_ATTR_INVALID_STATE) && 4163 if (HasIntAttribute(ui::AX_ATTR_INVALID_STATE) &&
4166 GetIntAttribute(ui::AX_ATTR_INVALID_STATE) != ui::AX_INVALID_STATE_FALSE) 4164 GetIntAttribute(ui::AX_ATTR_INVALID_STATE) != ui::AX_INVALID_STATE_FALSE)
4167 ia2_state |= IA2_STATE_INVALID_ENTRY; 4165 ia2_state |= IA2_STATE_INVALID_ENTRY;
4168 if (HasState(ui::AX_STATE_INVISIBLE)) 4166 if (HasState(ui::AX_STATE_INVISIBLE))
4169 ia_state |= STATE_SYSTEM_INVISIBLE; 4167 ia_state |= STATE_SYSTEM_INVISIBLE;
4170 if (HasState(ui::AX_STATE_LINKED)) 4168 if (HasState(ui::AX_STATE_LINKED))
4171 ia_state |= STATE_SYSTEM_LINKED; 4169 ia_state |= STATE_SYSTEM_LINKED;
4172 if (HasState(ui::AX_STATE_MULTISELECTABLE)) { 4170 if (HasState(ui::AX_STATE_MULTISELECTABLE)) {
4173 ia_state |= STATE_SYSTEM_EXTSELECTABLE; 4171 ia_state |= STATE_SYSTEM_EXTSELECTABLE;
4174 ia_state |= STATE_SYSTEM_MULTISELECTABLE; 4172 ia_state |= STATE_SYSTEM_MULTISELECTABLE;
(...skipping 28 matching lines...) Expand all
4203 BrowserAccessibilityStateImpl* accessibility_state = 4201 BrowserAccessibilityStateImpl* accessibility_state =
4204 BrowserAccessibilityStateImpl::GetInstance(); 4202 BrowserAccessibilityStateImpl::GetInstance();
4205 if (!accessibility_state->disable_hot_tracking_for_testing()) { 4203 if (!accessibility_state->disable_hot_tracking_for_testing()) {
4206 if (HasState(ui::AX_STATE_HOVERED)) 4204 if (HasState(ui::AX_STATE_HOVERED))
4207 ia_state |= STATE_SYSTEM_HOTTRACKED; 4205 ia_state |= STATE_SYSTEM_HOTTRACKED;
4208 } 4206 }
4209 4207
4210 if (IsEditableText()) 4208 if (IsEditableText())
4211 ia2_state |= IA2_STATE_EDITABLE; 4209 ia2_state |= IA2_STATE_EDITABLE;
4212 4210
4213 if (GetBoolAttribute(ui::AX_ATTR_BUTTON_MIXED)) 4211 if (GetBoolAttribute(ui::AX_ATTR_STATE_MIXED))
4214 ia_state |= STATE_SYSTEM_MIXED; 4212 ia_state |= STATE_SYSTEM_MIXED;
4215 4213
4216 if (GetBoolAttribute(ui::AX_ATTR_CAN_SET_VALUE)) 4214 if (GetBoolAttribute(ui::AX_ATTR_CAN_SET_VALUE))
4217 ia2_state |= IA2_STATE_EDITABLE; 4215 ia2_state |= IA2_STATE_EDITABLE;
4218 4216
4219 if (!GetStringAttribute(ui::AX_ATTR_AUTO_COMPLETE).empty()) 4217 if (!GetStringAttribute(ui::AX_ATTR_AUTO_COMPLETE).empty())
4220 ia2_state |= IA2_STATE_SUPPORTS_AUTOCOMPLETION; 4218 ia2_state |= IA2_STATE_SUPPORTS_AUTOCOMPLETION;
4221 4219
4222 base::string16 html_tag = GetString16Attribute( 4220 base::string16 html_tag = GetString16Attribute(
4223 ui::AX_ATTR_HTML_TAG); 4221 ui::AX_ATTR_HTML_TAG);
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
4690 ia2_role = ia_role; 4688 ia2_role = ia_role;
4691 4689
4692 win_attributes_->ia_role = ia_role; 4690 win_attributes_->ia_role = ia_role;
4693 win_attributes_->ia_state = ia_state; 4691 win_attributes_->ia_state = ia_state;
4694 win_attributes_->role_name = role_name; 4692 win_attributes_->role_name = role_name;
4695 win_attributes_->ia2_role = ia2_role; 4693 win_attributes_->ia2_role = ia2_role;
4696 win_attributes_->ia2_state = ia2_state; 4694 win_attributes_->ia2_state = ia2_state;
4697 } 4695 }
4698 4696
4699 } // namespace content 4697 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698