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

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

Issue 1132963002: Handles conversion rule for TimeRole and updates InputTimeRole. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 4052 matching lines...) Expand 10 before | Expand all | Expand 10 after
4063 case ui::AX_ROLE_IMAGE_MAP: 4063 case ui::AX_ROLE_IMAGE_MAP:
4064 role_name = html_tag; 4064 role_name = html_tag;
4065 ia2_role = IA2_ROLE_IMAGE_MAP; 4065 ia2_role = IA2_ROLE_IMAGE_MAP;
4066 ia_state |= STATE_SYSTEM_READONLY; 4066 ia_state |= STATE_SYSTEM_READONLY;
4067 break; 4067 break;
4068 case ui::AX_ROLE_IMAGE_MAP_LINK: 4068 case ui::AX_ROLE_IMAGE_MAP_LINK:
4069 ia_role = ROLE_SYSTEM_LINK; 4069 ia_role = ROLE_SYSTEM_LINK;
4070 ia_state |= STATE_SYSTEM_LINKED; 4070 ia_state |= STATE_SYSTEM_LINKED;
4071 ia_state |= STATE_SYSTEM_READONLY; 4071 ia_state |= STATE_SYSTEM_READONLY;
4072 break; 4072 break;
4073 case ui::AX_ROLE_INPUT_TIME:
4074 ia_role = ROLE_SYSTEM_SPINBUTTON;
dmazzoni 2015/05/10 06:33:07 This probably isn't right anymore. Back when I add
je_julie(Not used) 2015/05/21 02:25:17 Thanks for your comment. I found it's mapped to RO
4075 break;
4073 case ui::AX_ROLE_LABEL_TEXT: 4076 case ui::AX_ROLE_LABEL_TEXT:
4074 case ui::AX_ROLE_LEGEND: 4077 case ui::AX_ROLE_LEGEND:
4075 ia_role = ROLE_SYSTEM_TEXT; 4078 ia_role = ROLE_SYSTEM_TEXT;
4076 ia2_role = IA2_ROLE_LABEL; 4079 ia2_role = IA2_ROLE_LABEL;
4077 break; 4080 break;
4078 case ui::AX_ROLE_LINK: 4081 case ui::AX_ROLE_LINK:
4079 ia_role = ROLE_SYSTEM_LINK; 4082 ia_role = ROLE_SYSTEM_LINK;
4080 ia_state |= STATE_SYSTEM_LINKED; 4083 ia_state |= STATE_SYSTEM_LINKED;
4081 break; 4084 break;
4082 case ui::AX_ROLE_LIST: 4085 case ui::AX_ROLE_LIST:
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
4277 case ui::AX_ROLE_SEARCH_BOX: 4280 case ui::AX_ROLE_SEARCH_BOX:
4278 ia_role = ROLE_SYSTEM_TEXT; 4281 ia_role = ROLE_SYSTEM_TEXT;
4279 if (HasState(ui::AX_STATE_MULTILINE)) 4282 if (HasState(ui::AX_STATE_MULTILINE))
4280 ia2_state |= IA2_STATE_MULTI_LINE; 4283 ia2_state |= IA2_STATE_MULTI_LINE;
4281 else 4284 else
4282 ia2_state |= IA2_STATE_SINGLE_LINE; 4285 ia2_state |= IA2_STATE_SINGLE_LINE;
4283 ia2_state |= IA2_STATE_EDITABLE; 4286 ia2_state |= IA2_STATE_EDITABLE;
4284 ia2_state |= IA2_STATE_SELECTABLE_TEXT; 4287 ia2_state |= IA2_STATE_SELECTABLE_TEXT;
4285 break; 4288 break;
4286 case ui::AX_ROLE_TIME: 4289 case ui::AX_ROLE_TIME:
4287 ia_role = ROLE_SYSTEM_SPINBUTTON; 4290 ia_role = ROLE_SYSTEM_TEXT;
4291 ia2_role = IA2_ROLE_TEXT_FRAME;
4288 break; 4292 break;
4289 case ui::AX_ROLE_TIMER: 4293 case ui::AX_ROLE_TIMER:
4290 ia_role = ROLE_SYSTEM_CLOCK; 4294 ia_role = ROLE_SYSTEM_CLOCK;
4291 ia_state |= STATE_SYSTEM_READONLY; 4295 ia_state |= STATE_SYSTEM_READONLY;
4292 break; 4296 break;
4293 case ui::AX_ROLE_TOOLBAR: 4297 case ui::AX_ROLE_TOOLBAR:
4294 ia_role = ROLE_SYSTEM_TOOLBAR; 4298 ia_role = ROLE_SYSTEM_TOOLBAR;
4295 ia_state |= STATE_SYSTEM_READONLY; 4299 ia_state |= STATE_SYSTEM_READONLY;
4296 break; 4300 break;
4297 case ui::AX_ROLE_TOOLTIP: 4301 case ui::AX_ROLE_TOOLTIP:
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
4350 ia2_role = ia_role; 4354 ia2_role = ia_role;
4351 4355
4352 win_attributes_->ia_role = ia_role; 4356 win_attributes_->ia_role = ia_role;
4353 win_attributes_->ia_state = ia_state; 4357 win_attributes_->ia_state = ia_state;
4354 win_attributes_->role_name = role_name; 4358 win_attributes_->role_name = role_name;
4355 win_attributes_->ia2_role = ia2_role; 4359 win_attributes_->ia2_role = ia2_role;
4356 win_attributes_->ia2_state = ia2_state; 4360 win_attributes_->ia2_state = ia2_state;
4357 } 4361 }
4358 4362
4359 } // namespace content 4363 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698