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

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: Maps InputTime role to ROLE_SYSTEM_GROUPING Created 5 years, 6 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 4050 matching lines...) Expand 10 before | Expand all | Expand 10 after
4061 case ui::AX_ROLE_IMAGE_MAP: 4061 case ui::AX_ROLE_IMAGE_MAP:
4062 role_name = html_tag; 4062 role_name = html_tag;
4063 ia2_role = IA2_ROLE_IMAGE_MAP; 4063 ia2_role = IA2_ROLE_IMAGE_MAP;
4064 ia_state |= STATE_SYSTEM_READONLY; 4064 ia_state |= STATE_SYSTEM_READONLY;
4065 break; 4065 break;
4066 case ui::AX_ROLE_IMAGE_MAP_LINK: 4066 case ui::AX_ROLE_IMAGE_MAP_LINK:
4067 ia_role = ROLE_SYSTEM_LINK; 4067 ia_role = ROLE_SYSTEM_LINK;
4068 ia_state |= STATE_SYSTEM_LINKED; 4068 ia_state |= STATE_SYSTEM_LINKED;
4069 ia_state |= STATE_SYSTEM_READONLY; 4069 ia_state |= STATE_SYSTEM_READONLY;
4070 break; 4070 break;
4071 case ui::AX_ROLE_INPUT_TIME:
4072 ia_role = ROLE_SYSTEM_GROUPING;
4073 break;
4071 case ui::AX_ROLE_LABEL_TEXT: 4074 case ui::AX_ROLE_LABEL_TEXT:
4072 case ui::AX_ROLE_LEGEND: 4075 case ui::AX_ROLE_LEGEND:
4073 ia_role = ROLE_SYSTEM_TEXT; 4076 ia_role = ROLE_SYSTEM_TEXT;
4074 ia2_role = IA2_ROLE_LABEL; 4077 ia2_role = IA2_ROLE_LABEL;
4075 break; 4078 break;
4076 case ui::AX_ROLE_LINK: 4079 case ui::AX_ROLE_LINK:
4077 ia_role = ROLE_SYSTEM_LINK; 4080 ia_role = ROLE_SYSTEM_LINK;
4078 ia_state |= STATE_SYSTEM_LINKED; 4081 ia_state |= STATE_SYSTEM_LINKED;
4079 break; 4082 break;
4080 case ui::AX_ROLE_LIST: 4083 case ui::AX_ROLE_LIST:
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
4275 case ui::AX_ROLE_SEARCH_BOX: 4278 case ui::AX_ROLE_SEARCH_BOX:
4276 ia_role = ROLE_SYSTEM_TEXT; 4279 ia_role = ROLE_SYSTEM_TEXT;
4277 if (HasState(ui::AX_STATE_MULTILINE)) 4280 if (HasState(ui::AX_STATE_MULTILINE))
4278 ia2_state |= IA2_STATE_MULTI_LINE; 4281 ia2_state |= IA2_STATE_MULTI_LINE;
4279 else 4282 else
4280 ia2_state |= IA2_STATE_SINGLE_LINE; 4283 ia2_state |= IA2_STATE_SINGLE_LINE;
4281 ia2_state |= IA2_STATE_EDITABLE; 4284 ia2_state |= IA2_STATE_EDITABLE;
4282 ia2_state |= IA2_STATE_SELECTABLE_TEXT; 4285 ia2_state |= IA2_STATE_SELECTABLE_TEXT;
4283 break; 4286 break;
4284 case ui::AX_ROLE_TIME: 4287 case ui::AX_ROLE_TIME:
4285 ia_role = ROLE_SYSTEM_SPINBUTTON; 4288 ia_role = ROLE_SYSTEM_TEXT;
4289 ia2_role = IA2_ROLE_TEXT_FRAME;
4286 break; 4290 break;
4287 case ui::AX_ROLE_TIMER: 4291 case ui::AX_ROLE_TIMER:
4288 ia_role = ROLE_SYSTEM_CLOCK; 4292 ia_role = ROLE_SYSTEM_CLOCK;
4289 ia_state |= STATE_SYSTEM_READONLY; 4293 ia_state |= STATE_SYSTEM_READONLY;
4290 break; 4294 break;
4291 case ui::AX_ROLE_TOOLBAR: 4295 case ui::AX_ROLE_TOOLBAR:
4292 ia_role = ROLE_SYSTEM_TOOLBAR; 4296 ia_role = ROLE_SYSTEM_TOOLBAR;
4293 ia_state |= STATE_SYSTEM_READONLY; 4297 ia_state |= STATE_SYSTEM_READONLY;
4294 break; 4298 break;
4295 case ui::AX_ROLE_TOOLTIP: 4299 case ui::AX_ROLE_TOOLTIP:
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
4348 ia2_role = ia_role; 4352 ia2_role = ia_role;
4349 4353
4350 win_attributes_->ia_role = ia_role; 4354 win_attributes_->ia_role = ia_role;
4351 win_attributes_->ia_state = ia_state; 4355 win_attributes_->ia_state = ia_state;
4352 win_attributes_->role_name = role_name; 4356 win_attributes_->role_name = role_name;
4353 win_attributes_->ia2_role = ia2_role; 4357 win_attributes_->ia2_role = ia2_role;
4354 win_attributes_->ia2_state = ia2_state; 4358 win_attributes_->ia2_state = ia2_state;
4355 } 4359 }
4356 4360
4357 } // namespace content 4361 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698