| Index: ui/accessibility/platform/ax_platform_node_win.cc
|
| diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc
|
| index 428222ef6664e2b97b1c54e7eac3e35e82c884b8..ba1404e05fa1bdd81aa84a2e73f1a39d177a5cfe 100644
|
| --- a/ui/accessibility/platform/ax_platform_node_win.cc
|
| +++ b/ui/accessibility/platform/ax_platform_node_win.cc
|
| @@ -1044,11 +1044,10 @@ int AXPlatformNodeWin::MSAARole() {
|
| }
|
|
|
| int AXPlatformNodeWin::MSAAState() {
|
| - uint32_t state = GetData().state;
|
| + const AXNodeData& data = GetData();
|
| + uint32_t state = data.state;
|
|
|
| int msaa_state = 0;
|
| - if (state & (1 << ui::AX_STATE_CHECKED))
|
| - msaa_state |= STATE_SYSTEM_CHECKED;
|
| if (state & (1 << ui::AX_STATE_COLLAPSED))
|
| msaa_state |= STATE_SYSTEM_COLLAPSED;
|
| if (state & (1 << ui::AX_STATE_DEFAULT))
|
| @@ -1080,6 +1079,19 @@ int AXPlatformNodeWin::MSAAState() {
|
| if (state & (1 << ui::AX_STATE_DISABLED))
|
| msaa_state |= STATE_SYSTEM_UNAVAILABLE;
|
|
|
| + // Checked state
|
| + const int checked = GetIntAttribute(ui::AX_ATTR_INVALID_STATE);
|
| + switch (checked) {
|
| + case ui::AX_CHECKED_STATE_TRUE:
|
| + msaa_state |= STATE_SYSTEM_CHECKED;
|
| + break;
|
| + case ui::AX_CHECKED_STATE_MIXED:
|
| + msaa_state |= (STATE_SYSTEM_MIXED | STATE_SYSTEM_CHECKED);
|
| + break;
|
| + default:
|
| + break;
|
| + }
|
| +
|
| gfx::NativeViewAccessible focus = delegate_->GetFocus();
|
| if (focus == GetNativeViewAccessible())
|
| msaa_state |= STATE_SYSTEM_FOCUSED;
|
| @@ -1090,7 +1102,7 @@ int AXPlatformNodeWin::MSAAState() {
|
| // TODO(dmazzoni): this should probably check if focus is actually inside
|
| // the menu bar, but we don't currently track focus inside menu pop-ups,
|
| // and Chrome only has one menu visible at a time so this works for now.
|
| - if (GetData().role == ui::AX_ROLE_MENU_BAR &&
|
| + if (data.role == ui::AX_ROLE_MENU_BAR &&
|
| !(state & (1 << ui::AX_STATE_INVISIBLE))) {
|
| msaa_state |= STATE_SYSTEM_FOCUSED;
|
| }
|
|
|