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

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

Issue 771583002: Expose aria-pressed as STATE_SYSTEM_PRESSED on windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/aria-button-expected-win.txt » ('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 3394 matching lines...) Expand 10 before | Expand all | Expand 10 after
3405 case ui::AX_ROLE_BLOCKQUOTE: 3405 case ui::AX_ROLE_BLOCKQUOTE:
3406 role_name_ = html_tag; 3406 role_name_ = html_tag;
3407 ia2_role_ = IA2_ROLE_SECTION; 3407 ia2_role_ = IA2_ROLE_SECTION;
3408 break; 3408 break;
3409 case ui::AX_ROLE_BUSY_INDICATOR: 3409 case ui::AX_ROLE_BUSY_INDICATOR:
3410 ia_role_ = ROLE_SYSTEM_ANIMATION; 3410 ia_role_ = ROLE_SYSTEM_ANIMATION;
3411 ia_state_ |= STATE_SYSTEM_READONLY; 3411 ia_state_ |= STATE_SYSTEM_READONLY;
3412 break; 3412 break;
3413 case ui::AX_ROLE_BUTTON: 3413 case ui::AX_ROLE_BUTTON:
3414 ia_role_ = ROLE_SYSTEM_PUSHBUTTON; 3414 ia_role_ = ROLE_SYSTEM_PUSHBUTTON;
3415 bool is_aria_pressed_defined;
3416 bool is_mixed;
3417 if (GetAriaTristate("aria-pressed", &is_aria_pressed_defined, &is_mixed))
3418 ia_state_ |= STATE_SYSTEM_PRESSED;
3419 if (is_aria_pressed_defined)
3420 ia2_role_ = IA2_ROLE_TOGGLE_BUTTON;
3421 if (is_mixed)
3422 ia_state_ |= STATE_SYSTEM_MIXED;
3423 break; 3415 break;
3424 case ui::AX_ROLE_CANVAS: 3416 case ui::AX_ROLE_CANVAS:
3425 if (GetBoolAttribute(ui::AX_ATTR_CANVAS_HAS_FALLBACK)) { 3417 if (GetBoolAttribute(ui::AX_ATTR_CANVAS_HAS_FALLBACK)) {
3426 role_name_ = L"canvas"; 3418 role_name_ = L"canvas";
3427 ia2_role_ = IA2_ROLE_CANVAS; 3419 ia2_role_ = IA2_ROLE_CANVAS;
3428 } else { 3420 } else {
3429 ia_role_ = ROLE_SYSTEM_GRAPHIC; 3421 ia_role_ = ROLE_SYSTEM_GRAPHIC;
3430 } 3422 }
3431 break; 3423 break;
3432 case ui::AX_ROLE_CELL: 3424 case ui::AX_ROLE_CELL:
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
3833 // The role should always be set. 3825 // The role should always be set.
3834 DCHECK(!role_name_.empty() || ia_role_); 3826 DCHECK(!role_name_.empty() || ia_role_);
3835 3827
3836 // If we didn't explicitly set the IAccessible2 role, make it the same 3828 // If we didn't explicitly set the IAccessible2 role, make it the same
3837 // as the MSAA role. 3829 // as the MSAA role.
3838 if (!ia2_role_) 3830 if (!ia2_role_)
3839 ia2_role_ = ia_role_; 3831 ia2_role_ = ia_role_;
3840 } 3832 }
3841 3833
3842 } // namespace content 3834 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/test/data/accessibility/aria-button-expected-win.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698