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

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

Issue 559343002: Add AX attribute conversion for input type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add AX attribute conversion for input type 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
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 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2902 // 2902 //
2903 2903
2904 // Called every time this node's data changes. 2904 // Called every time this node's data changes.
2905 void BrowserAccessibilityWin::OnDataChanged() { 2905 void BrowserAccessibilityWin::OnDataChanged() {
2906 BrowserAccessibility::OnDataChanged(); 2906 BrowserAccessibility::OnDataChanged();
2907 2907
2908 InitRoleAndState(); 2908 InitRoleAndState();
2909 2909
2910 // Expose the "display" and "tag" attributes. 2910 // Expose the "display" and "tag" attributes.
2911 StringAttributeToIA2(ui::AX_ATTR_DISPLAY, "display"); 2911 StringAttributeToIA2(ui::AX_ATTR_DISPLAY, "display");
2912 StringAttributeToIA2(ui::AX_ATTR_TEXT_INPUT_TYPE, "text_input_type");
dmazzoni 2014/09/26 15:29:16 This must be exactly "text-input-type" to match Mo
je_julie(Not used) 2014/09/28 14:57:25 I'll update it. On 2014/09/26 15:29:16, dmazzoni w
2912 StringAttributeToIA2(ui::AX_ATTR_HTML_TAG, "tag"); 2913 StringAttributeToIA2(ui::AX_ATTR_HTML_TAG, "tag");
2913 StringAttributeToIA2(ui::AX_ATTR_ROLE, "xml-roles"); 2914 StringAttributeToIA2(ui::AX_ATTR_ROLE, "xml-roles");
2914 2915
2915 // Expose "level" attribute for headings, trees, etc. 2916 // Expose "level" attribute for headings, trees, etc.
2916 IntAttributeToIA2(ui::AX_ATTR_HIERARCHICAL_LEVEL, "level"); 2917 IntAttributeToIA2(ui::AX_ATTR_HIERARCHICAL_LEVEL, "level");
2917 2918
2918 // Expose the set size and position in set for listbox options. 2919 // Expose the set size and position in set for listbox options.
2919 if (GetRole() == ui::AX_ROLE_LIST_BOX_OPTION && 2920 if (GetRole() == ui::AX_ROLE_LIST_BOX_OPTION &&
2920 GetParent() && 2921 GetParent() &&
2921 GetParent()->GetRole() == ui::AX_ROLE_LIST_BOX) { 2922 GetParent()->GetRole() == ui::AX_ROLE_LIST_BOX) {
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
3804 // The role should always be set. 3805 // The role should always be set.
3805 DCHECK(!role_name_.empty() || ia_role_); 3806 DCHECK(!role_name_.empty() || ia_role_);
3806 3807
3807 // If we didn't explicitly set the IAccessible2 role, make it the same 3808 // If we didn't explicitly set the IAccessible2 role, make it the same
3808 // as the MSAA role. 3809 // as the MSAA role.
3809 if (!ia2_role_) 3810 if (!ia2_role_)
3810 ia2_role_ = ia_role_; 3811 ia2_role_ = ia_role_;
3811 } 3812 }
3812 3813
3813 } // namespace content 3814 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698