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 <algorithm> | 10 #include <algorithm> |
(...skipping 3826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3837 if (unique_cell_ids[i] == GetId()) { | 3837 if (unique_cell_ids[i] == GetId()) { |
3838 win_attributes_->ia2_attributes.push_back( | 3838 win_attributes_->ia2_attributes.push_back( |
3839 base::string16(L"table-cell-index:") + base::IntToString16(i)); | 3839 base::string16(L"table-cell-index:") + base::IntToString16(i)); |
3840 } | 3840 } |
3841 } | 3841 } |
3842 } | 3842 } |
3843 } | 3843 } |
3844 | 3844 |
3845 // Expose aria-colcount and aria-rowcount in a table, grid or treegrid. | 3845 // Expose aria-colcount and aria-rowcount in a table, grid or treegrid. |
3846 if (IsTableOrGridOrTreeGridRole()) { | 3846 if (IsTableOrGridOrTreeGridRole()) { |
3847 IntAttributeToIA2(ui::AX_ATTR_ARIA_COL_COUNT, "colcount"); | 3847 IntAttributeToIA2(ui::AX_ATTR_ARIA_COLUMN_COUNT, "colcount"); |
3848 IntAttributeToIA2(ui::AX_ATTR_ARIA_ROW_COUNT, "rowcount"); | 3848 IntAttributeToIA2(ui::AX_ATTR_ARIA_ROW_COUNT, "rowcount"); |
3849 } | 3849 } |
3850 | 3850 |
3851 // Expose aria-colindex and aria-rowindex in a cell or row. | 3851 // Expose aria-colindex and aria-rowindex in a cell or row. |
3852 if (IsCellOrTableHeaderRole() || GetRole() == ui::AX_ROLE_ROW) { | 3852 if (IsCellOrTableHeaderRole() || GetRole() == ui::AX_ROLE_ROW) { |
3853 if (GetRole() != ui::AX_ROLE_ROW) | 3853 if (GetRole() != ui::AX_ROLE_ROW) |
3854 IntAttributeToIA2(ui::AX_ATTR_ARIA_COL_INDEX, "colindex"); | 3854 IntAttributeToIA2(ui::AX_ATTR_ARIA_CELL_COLUMN_INDEX, "colindex"); |
3855 IntAttributeToIA2(ui::AX_ATTR_ARIA_ROW_INDEX, "rowindex"); | 3855 IntAttributeToIA2(ui::AX_ATTR_ARIA_CELL_ROW_INDEX, "rowindex"); |
3856 } | 3856 } |
3857 | 3857 |
3858 // Expose row or column header sort direction. | 3858 // Expose row or column header sort direction. |
3859 int32_t sort_direction; | 3859 int32_t sort_direction; |
3860 if ((ia_role() == ROLE_SYSTEM_COLUMNHEADER || | 3860 if ((ia_role() == ROLE_SYSTEM_COLUMNHEADER || |
3861 ia_role() == ROLE_SYSTEM_ROWHEADER) && | 3861 ia_role() == ROLE_SYSTEM_ROWHEADER) && |
3862 GetIntAttribute(ui::AX_ATTR_SORT_DIRECTION, &sort_direction)) { | 3862 GetIntAttribute(ui::AX_ATTR_SORT_DIRECTION, &sort_direction)) { |
3863 switch (static_cast<ui::AXSortDirection>(sort_direction)) { | 3863 switch (static_cast<ui::AXSortDirection>(sort_direction)) { |
3864 case ui::AX_SORT_DIRECTION_NONE: | 3864 case ui::AX_SORT_DIRECTION_NONE: |
3865 break; | 3865 break; |
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5623 return static_cast<BrowserAccessibilityWin*>(obj); | 5623 return static_cast<BrowserAccessibilityWin*>(obj); |
5624 } | 5624 } |
5625 | 5625 |
5626 const BrowserAccessibilityWin* | 5626 const BrowserAccessibilityWin* |
5627 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) { | 5627 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) { |
5628 DCHECK(!obj || obj->IsNative()); | 5628 DCHECK(!obj || obj->IsNative()); |
5629 return static_cast<const BrowserAccessibilityWin*>(obj); | 5629 return static_cast<const BrowserAccessibilityWin*>(obj); |
5630 } | 5630 } |
5631 | 5631 |
5632 } // namespace content | 5632 } // namespace content |
OLD | NEW |