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

Unified Diff: ui/views/controls/button/checkbox.cc

Issue 196133012: Fix incorrect use of AXState caused when refactoring two enums into one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename SetStateFlag -> AddStateFlag Created 6 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/accessibility/native_view_accessibility_win.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/checkbox.cc
diff --git a/ui/views/controls/button/checkbox.cc b/ui/views/controls/button/checkbox.cc
index 2389b62bbf43c9b326b3697a6372a0a3ff77065a..22c5f88e2d6c6a61783212485a2873df25d34231 100644
--- a/ui/views/controls/button/checkbox.cc
+++ b/ui/views/controls/button/checkbox.cc
@@ -97,7 +97,8 @@ const char* Checkbox::GetClassName() const {
void Checkbox::GetAccessibleState(ui::AXViewState* state) {
LabelButton::GetAccessibleState(state);
state->role = ui::AX_ROLE_CHECK_BOX;
- state->state = checked() ? ui::AX_STATE_CHECKED : 0;
+ if (checked())
+ state->AddStateFlag(ui::AX_STATE_CHECKED);
}
void Checkbox::OnFocus() {
« no previous file with comments | « ui/views/accessibility/native_view_accessibility_win.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698