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

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

Issue 837183002: Add a helper function and update test results with ax role of table header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update TC Created 5 years, 11 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 2945 matching lines...) Expand 10 before | Expand all | Expand 10 after
2956 "container-busy"); 2956 "container-busy");
2957 2957
2958 // Expose slider value. 2958 // Expose slider value.
2959 if (ia_role_ == ROLE_SYSTEM_PROGRESSBAR || 2959 if (ia_role_ == ROLE_SYSTEM_PROGRESSBAR ||
2960 ia_role_ == ROLE_SYSTEM_SCROLLBAR || 2960 ia_role_ == ROLE_SYSTEM_SCROLLBAR ||
2961 ia_role_ == ROLE_SYSTEM_SLIDER) { 2961 ia_role_ == ROLE_SYSTEM_SLIDER) {
2962 ia2_attributes_.push_back(L"valuetext:" + GetValueText()); 2962 ia2_attributes_.push_back(L"valuetext:" + GetValueText());
2963 } 2963 }
2964 2964
2965 // Expose table cell index. 2965 // Expose table cell index.
2966 if (ia_role_ == ROLE_SYSTEM_CELL) { 2966 if (ia_role_ == ROLE_SYSTEM_CELL || ia_role_ == ROLE_SYSTEM_ROWHEADER ||
2967 ia_role_ == ROLE_SYSTEM_COLUMNHEADER) {
dmazzoni 2015/01/08 18:11:25 Same here - it sounds like the helper should be in
je_julie(Not used) 2015/01/09 16:47:37 Done.
2967 BrowserAccessibility* table = GetParent(); 2968 BrowserAccessibility* table = GetParent();
2968 while (table && table->GetRole() != ui::AX_ROLE_TABLE) 2969 while (table && table->GetRole() != ui::AX_ROLE_TABLE)
2969 table = table->GetParent(); 2970 table = table->GetParent();
2970 if (table) { 2971 if (table) {
2971 const std::vector<int32>& unique_cell_ids = table->GetIntListAttribute( 2972 const std::vector<int32>& unique_cell_ids = table->GetIntListAttribute(
2972 ui::AX_ATTR_UNIQUE_CELL_IDS); 2973 ui::AX_ATTR_UNIQUE_CELL_IDS);
2973 for (size_t i = 0; i < unique_cell_ids.size(); ++i) { 2974 for (size_t i = 0; i < unique_cell_ids.size(); ++i) {
2974 if (unique_cell_ids[i] == GetId()) { 2975 if (unique_cell_ids[i] == GetId()) {
2975 ia2_attributes_.push_back( 2976 ia2_attributes_.push_back(
2976 base::string16(L"table-cell-index:") + base::IntToString16(i)); 2977 base::string16(L"table-cell-index:") + base::IntToString16(i));
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
3847 // The role should always be set. 3848 // The role should always be set.
3848 DCHECK(!role_name_.empty() || ia_role_); 3849 DCHECK(!role_name_.empty() || ia_role_);
3849 3850
3850 // If we didn't explicitly set the IAccessible2 role, make it the same 3851 // If we didn't explicitly set the IAccessible2 role, make it the same
3851 // as the MSAA role. 3852 // as the MSAA role.
3852 if (!ia2_role_) 3853 if (!ia2_role_)
3853 ia2_role_ = ia_role_; 3854 ia2_role_ = ia_role_;
3854 } 3855 }
3855 3856
3856 } // namespace content 3857 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698