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

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

Issue 1046883002: Use multiline attribute to check for IA2_STATE_MULTILINE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing textarea Created 5 years, 8 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 4046 matching lines...) Expand 10 before | Expand all | Expand 10 after
4057 case ui::AX_ROLE_TAB_LIST: 4057 case ui::AX_ROLE_TAB_LIST:
4058 ia_role = ROLE_SYSTEM_PAGETABLIST; 4058 ia_role = ROLE_SYSTEM_PAGETABLIST;
4059 break; 4059 break;
4060 case ui::AX_ROLE_TAB_PANEL: 4060 case ui::AX_ROLE_TAB_PANEL:
4061 ia_role = ROLE_SYSTEM_PROPERTYPAGE; 4061 ia_role = ROLE_SYSTEM_PROPERTYPAGE;
4062 break; 4062 break;
4063 case ui::AX_ROLE_TOGGLE_BUTTON: 4063 case ui::AX_ROLE_TOGGLE_BUTTON:
4064 ia_role = ROLE_SYSTEM_PUSHBUTTON; 4064 ia_role = ROLE_SYSTEM_PUSHBUTTON;
4065 ia2_role = IA2_ROLE_TOGGLE_BUTTON; 4065 ia2_role = IA2_ROLE_TOGGLE_BUTTON;
4066 break; 4066 break;
4067 case ui::AX_ROLE_TEXT_AREA:
4068 ia_role = ROLE_SYSTEM_TEXT;
4069 ia2_state |= IA2_STATE_MULTI_LINE;
4070 ia2_state |= IA2_STATE_EDITABLE;
4071 ia2_state |= IA2_STATE_SELECTABLE_TEXT;
4072 break;
4073 case ui::AX_ROLE_TEXT_FIELD: 4067 case ui::AX_ROLE_TEXT_FIELD:
4074 case ui::AX_ROLE_SEARCH_BOX: 4068 case ui::AX_ROLE_SEARCH_BOX:
4075 ia_role = ROLE_SYSTEM_TEXT; 4069 ia_role = ROLE_SYSTEM_TEXT;
4076 ia2_state |= IA2_STATE_SINGLE_LINE; 4070 if (HasState(ui::AX_STATE_MULTILINE))
4071 ia2_state |= IA2_STATE_MULTI_LINE;
4072 else
4073 ia2_state |= IA2_STATE_SINGLE_LINE;
4077 ia2_state |= IA2_STATE_EDITABLE; 4074 ia2_state |= IA2_STATE_EDITABLE;
4078 ia2_state |= IA2_STATE_SELECTABLE_TEXT; 4075 ia2_state |= IA2_STATE_SELECTABLE_TEXT;
4079 break; 4076 break;
4080 case ui::AX_ROLE_TIME: 4077 case ui::AX_ROLE_TIME:
4081 ia_role = ROLE_SYSTEM_SPINBUTTON; 4078 ia_role = ROLE_SYSTEM_SPINBUTTON;
4082 break; 4079 break;
4083 case ui::AX_ROLE_TIMER: 4080 case ui::AX_ROLE_TIMER:
4084 ia_role = ROLE_SYSTEM_CLOCK; 4081 ia_role = ROLE_SYSTEM_CLOCK;
4085 ia_state |= STATE_SYSTEM_READONLY; 4082 ia_state |= STATE_SYSTEM_READONLY;
4086 break; 4083 break;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
4144 ia2_role = ia_role; 4141 ia2_role = ia_role;
4145 4142
4146 win_attributes_->ia_role = ia_role; 4143 win_attributes_->ia_role = ia_role;
4147 win_attributes_->ia_state = ia_state; 4144 win_attributes_->ia_state = ia_state;
4148 win_attributes_->role_name = role_name; 4145 win_attributes_->role_name = role_name;
4149 win_attributes_->ia2_role = ia2_role; 4146 win_attributes_->ia2_role = ia2_role;
4150 win_attributes_->ia2_state = ia2_state; 4147 win_attributes_->ia2_state = ia2_state;
4151 } 4148 }
4152 4149
4153 } // namespace content 4150 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698