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

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

Issue 607803002: IAccessible2 state not defined for input type checkbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@323161exposeinputtypes
Patch Set: Created 6 years, 2 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 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 "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
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)) {
3430 ia_state_ |= STATE_SYSTEM_CHECKED;
dmazzoni 2014/09/29 05:49:51 This seems wrong - you're setting it to CHECKED wh
shreeramk 2014/09/29 05:58:32 GetAriaTristate() compares the value of the first
3431 ia2_state_ = IA2_STATE_CHECKABLE;
3432 if (is_mixed_check)
3433 ia_state_ |= STATE_SYSTEM_MIXED;
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698