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

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

Issue 512603003: Adds conversion rule for WebAXRoleFigure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added role mapping to platform Created 6 years, 3 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/renderer/accessibility/blink_ax_enum_conversion.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 3459 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 case ui::AX_ROLE_WEB_AREA: 3470 case ui::AX_ROLE_WEB_AREA:
3471 ia_role_ = ROLE_SYSTEM_DOCUMENT; 3471 ia_role_ = ROLE_SYSTEM_DOCUMENT;
3472 ia_state_ |= STATE_SYSTEM_READONLY; 3472 ia_state_ |= STATE_SYSTEM_READONLY;
3473 ia_state_ |= STATE_SYSTEM_FOCUSABLE; 3473 ia_state_ |= STATE_SYSTEM_FOCUSABLE;
3474 break; 3474 break;
3475 case ui::AX_ROLE_EDITABLE_TEXT: 3475 case ui::AX_ROLE_EDITABLE_TEXT:
3476 ia_role_ = ROLE_SYSTEM_TEXT; 3476 ia_role_ = ROLE_SYSTEM_TEXT;
3477 ia2_state_ |= IA2_STATE_SINGLE_LINE; 3477 ia2_state_ |= IA2_STATE_SINGLE_LINE;
3478 ia2_state_ |= IA2_STATE_EDITABLE; 3478 ia2_state_ |= IA2_STATE_EDITABLE;
3479 break; 3479 break;
3480 case ui::AX_ROLE_FIGURE:
3481 role_name_ = html_tag;
3482 ia_role_ = ROLE_SYSTEM_GROUPING;
3483 ia2_role_ = IA2_ROLE_SECTION;
3484 break;
3480 case ui::AX_ROLE_FORM: 3485 case ui::AX_ROLE_FORM:
3481 role_name_ = L"form"; 3486 role_name_ = L"form";
3482 ia2_role_ = IA2_ROLE_FORM; 3487 ia2_role_ = IA2_ROLE_FORM;
3483 break; 3488 break;
3484 case ui::AX_ROLE_FOOTER: 3489 case ui::AX_ROLE_FOOTER:
3485 ia_role_ = IA2_ROLE_FOOTER; 3490 ia_role_ = IA2_ROLE_FOOTER;
3486 ia_state_ |= STATE_SYSTEM_READONLY; 3491 ia_state_ |= STATE_SYSTEM_READONLY;
3487 break; 3492 break;
3488 case ui::AX_ROLE_GRID: 3493 case ui::AX_ROLE_GRID:
3489 ia_role_ = ROLE_SYSTEM_TABLE; 3494 ia_role_ = ROLE_SYSTEM_TABLE;
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
3793 // The role should always be set. 3798 // The role should always be set.
3794 DCHECK(!role_name_.empty() || ia_role_); 3799 DCHECK(!role_name_.empty() || ia_role_);
3795 3800
3796 // If we didn't explicitly set the IAccessible2 role, make it the same 3801 // If we didn't explicitly set the IAccessible2 role, make it the same
3797 // as the MSAA role. 3802 // as the MSAA role.
3798 if (!ia2_role_) 3803 if (!ia2_role_)
3799 ia2_role_ = ia_role_; 3804 ia2_role_ = ia_role_;
3800 } 3805 }
3801 3806
3802 } // namespace content 3807 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/accessibility/blink_ax_enum_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698