OLD | NEW |
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 Loading... |
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"); |
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 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3806 // The role should always be set. | 3807 // The role should always be set. |
3807 DCHECK(!role_name_.empty() || ia_role_); | 3808 DCHECK(!role_name_.empty() || ia_role_); |
3808 | 3809 |
3809 // If we didn't explicitly set the IAccessible2 role, make it the same | 3810 // If we didn't explicitly set the IAccessible2 role, make it the same |
3810 // as the MSAA role. | 3811 // as the MSAA role. |
3811 if (!ia2_role_) | 3812 if (!ia2_role_) |
3812 ia2_role_ = ia_role_; | 3813 ia2_role_ = ia_role_; |
3813 } | 3814 } |
3814 | 3815 |
3815 } // namespace content | 3816 } // namespace content |
OLD | NEW |