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

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

Issue 712313003: Exposing AXRole* correctly for HTML input types on mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updating expectations Created 6 years, 1 month 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/test/data/accessibility/input-color.html » ('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 3421 matching lines...) Expand 10 before | Expand all | Expand 10 after
3432 } 3432 }
3433 break; 3433 break;
3434 case ui::AX_ROLE_CELL: 3434 case ui::AX_ROLE_CELL:
3435 ia_role_ = ROLE_SYSTEM_CELL; 3435 ia_role_ = ROLE_SYSTEM_CELL;
3436 break; 3436 break;
3437 case ui::AX_ROLE_CHECK_BOX: 3437 case ui::AX_ROLE_CHECK_BOX:
3438 ia_role_ = ROLE_SYSTEM_CHECKBUTTON; 3438 ia_role_ = ROLE_SYSTEM_CHECKBUTTON;
3439 ia2_state_ |= IA2_STATE_CHECKABLE; 3439 ia2_state_ |= IA2_STATE_CHECKABLE;
3440 break; 3440 break;
3441 case ui::AX_ROLE_COLOR_WELL: 3441 case ui::AX_ROLE_COLOR_WELL:
3442 ia_role_ = ROLE_SYSTEM_CLIENT; 3442 ia_role_ = ROLE_SYSTEM_TEXT;
3443 ia2_role_ = IA2_ROLE_COLOR_CHOOSER; 3443 ia2_role_ = IA2_ROLE_COLOR_CHOOSER;
3444 break; 3444 break;
3445 case ui::AX_ROLE_COLUMN: 3445 case ui::AX_ROLE_COLUMN:
3446 ia_role_ = ROLE_SYSTEM_COLUMN; 3446 ia_role_ = ROLE_SYSTEM_COLUMN;
3447 break; 3447 break;
3448 case ui::AX_ROLE_COLUMN_HEADER: 3448 case ui::AX_ROLE_COLUMN_HEADER:
3449 ia_role_ = ROLE_SYSTEM_COLUMNHEADER; 3449 ia_role_ = ROLE_SYSTEM_COLUMNHEADER;
3450 break; 3450 break;
3451 case ui::AX_ROLE_COMBO_BOX: 3451 case ui::AX_ROLE_COMBO_BOX:
3452 ia_role_ = ROLE_SYSTEM_COMBOBOX; 3452 ia_role_ = ROLE_SYSTEM_COMBOBOX;
3453 break; 3453 break;
3454 case ui::AX_ROLE_COMPLEMENTARY: 3454 case ui::AX_ROLE_COMPLEMENTARY:
3455 ia_role_ = ROLE_SYSTEM_GROUPING; 3455 ia_role_ = ROLE_SYSTEM_GROUPING;
3456 ia2_role_ = IA2_ROLE_NOTE; 3456 ia2_role_ = IA2_ROLE_NOTE;
3457 break; 3457 break;
3458 case ui::AX_ROLE_CONTENT_INFO: 3458 case ui::AX_ROLE_CONTENT_INFO:
3459 ia_role_ = ROLE_SYSTEM_TEXT; 3459 ia_role_ = ROLE_SYSTEM_TEXT;
3460 ia2_role_ = IA2_ROLE_PARAGRAPH; 3460 ia2_role_ = IA2_ROLE_PARAGRAPH;
3461 break; 3461 break;
3462 case ui::AX_ROLE_DATE: 3462 case ui::AX_ROLE_DATE:
3463 ia_role_ = ROLE_SYSTEM_DROPLIST;
3464 ia2_role_ = IA2_ROLE_DATE_EDITOR;
3465 break;
3466 case ui::AX_ROLE_DATE_TIME: 3463 case ui::AX_ROLE_DATE_TIME:
3467 ia_role_ = ROLE_SYSTEM_DROPLIST; 3464 ia_role_ = ROLE_SYSTEM_DROPLIST;
3468 ia2_role_ = IA2_ROLE_DATE_EDITOR; 3465 ia2_role_ = IA2_ROLE_DATE_EDITOR;
3469 break; 3466 break;
3470 case ui::AX_ROLE_DIV: 3467 case ui::AX_ROLE_DIV:
3471 role_name_ = L"div"; 3468 role_name_ = L"div";
3472 ia_role_ = ROLE_SYSTEM_GROUPING; 3469 ia_role_ = ROLE_SYSTEM_GROUPING;
3473 ia2_role_ = IA2_ROLE_SECTION; 3470 ia2_role_ = IA2_ROLE_SECTION;
3474 break; 3471 break;
3475 case ui::AX_ROLE_DEFINITION: 3472 case ui::AX_ROLE_DEFINITION:
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
3856 // The role should always be set. 3853 // The role should always be set.
3857 DCHECK(!role_name_.empty() || ia_role_); 3854 DCHECK(!role_name_.empty() || ia_role_);
3858 3855
3859 // If we didn't explicitly set the IAccessible2 role, make it the same 3856 // If we didn't explicitly set the IAccessible2 role, make it the same
3860 // as the MSAA role. 3857 // as the MSAA role.
3861 if (!ia2_role_) 3858 if (!ia2_role_)
3862 ia2_role_ = ia_role_; 3859 ia2_role_ = ia_role_;
3863 } 3860 }
3864 3861
3865 } // namespace content 3862 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/test/data/accessibility/input-color.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698