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

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

Issue 591363003: Adds conversion rule for WebAXRoleDetails (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « no previous file | content/browser/accessibility/dump_accessibility_tree_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3438 matching lines...) Expand 10 before | Expand all | Expand 10 after
3449 break; 3449 break;
3450 case ui::AX_ROLE_DESCRIPTION_LIST_DETAIL: 3450 case ui::AX_ROLE_DESCRIPTION_LIST_DETAIL:
3451 role_name_ = html_tag; 3451 role_name_ = html_tag;
3452 ia2_role_ = IA2_ROLE_PARAGRAPH; 3452 ia2_role_ = IA2_ROLE_PARAGRAPH;
3453 ia_state_ |= STATE_SYSTEM_READONLY; 3453 ia_state_ |= STATE_SYSTEM_READONLY;
3454 break; 3454 break;
3455 case ui::AX_ROLE_DESCRIPTION_LIST_TERM: 3455 case ui::AX_ROLE_DESCRIPTION_LIST_TERM:
3456 ia_role_ = ROLE_SYSTEM_LISTITEM; 3456 ia_role_ = ROLE_SYSTEM_LISTITEM;
3457 ia_state_ |= STATE_SYSTEM_READONLY; 3457 ia_state_ |= STATE_SYSTEM_READONLY;
3458 break; 3458 break;
3459 case ui::AX_ROLE_DETAILS:
3460 ia_role_ = ROLE_SYSTEM_GROUPING;
3461 break;
3459 case ui::AX_ROLE_DIALOG: 3462 case ui::AX_ROLE_DIALOG:
3460 ia_role_ = ROLE_SYSTEM_DIALOG; 3463 ia_role_ = ROLE_SYSTEM_DIALOG;
3461 ia_state_ |= STATE_SYSTEM_READONLY; 3464 ia_state_ |= STATE_SYSTEM_READONLY;
3462 break; 3465 break;
3463 case ui::AX_ROLE_DISCLOSURE_TRIANGLE: 3466 case ui::AX_ROLE_DISCLOSURE_TRIANGLE:
3464 ia_role_ = ROLE_SYSTEM_OUTLINEBUTTON; 3467 ia_role_ = ROLE_SYSTEM_PUSHBUTTON;
3465 ia_state_ |= STATE_SYSTEM_READONLY;
3466 break; 3468 break;
3467 case ui::AX_ROLE_DOCUMENT: 3469 case ui::AX_ROLE_DOCUMENT:
3468 case ui::AX_ROLE_ROOT_WEB_AREA: 3470 case ui::AX_ROLE_ROOT_WEB_AREA:
3469 case ui::AX_ROLE_WEB_AREA: 3471 case ui::AX_ROLE_WEB_AREA:
3470 ia_role_ = ROLE_SYSTEM_DOCUMENT; 3472 ia_role_ = ROLE_SYSTEM_DOCUMENT;
3471 ia_state_ |= STATE_SYSTEM_READONLY; 3473 ia_state_ |= STATE_SYSTEM_READONLY;
3472 ia_state_ |= STATE_SYSTEM_FOCUSABLE; 3474 ia_state_ |= STATE_SYSTEM_FOCUSABLE;
3473 break; 3475 break;
3474 case ui::AX_ROLE_EDITABLE_TEXT: 3476 case ui::AX_ROLE_EDITABLE_TEXT:
3475 ia_role_ = ROLE_SYSTEM_TEXT; 3477 ia_role_ = ROLE_SYSTEM_TEXT;
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
3804 // The role should always be set. 3806 // The role should always be set.
3805 DCHECK(!role_name_.empty() || ia_role_); 3807 DCHECK(!role_name_.empty() || ia_role_);
3806 3808
3807 // If we didn't explicitly set the IAccessible2 role, make it the same 3809 // If we didn't explicitly set the IAccessible2 role, make it the same
3808 // as the MSAA role. 3810 // as the MSAA role.
3809 if (!ia2_role_) 3811 if (!ia2_role_)
3810 ia2_role_ = ia_role_; 3812 ia2_role_ = ia_role_;
3811 } 3813 }
3812 3814
3813 } // namespace content 3815 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/dump_accessibility_tree_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698