| 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 3800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3811 if (unique_cell_ids[i] == GetId()) { | 3811 if (unique_cell_ids[i] == GetId()) { |
| 3812 win_attributes_->ia2_attributes.push_back( | 3812 win_attributes_->ia2_attributes.push_back( |
| 3813 base::string16(L"table-cell-index:") + base::IntToString16(i)); | 3813 base::string16(L"table-cell-index:") + base::IntToString16(i)); |
| 3814 } | 3814 } |
| 3815 } | 3815 } |
| 3816 } | 3816 } |
| 3817 } | 3817 } |
| 3818 | 3818 |
| 3819 // Expose aria-colcount and aria-rowcount in a table, grid or treegrid. | 3819 // Expose aria-colcount and aria-rowcount in a table, grid or treegrid. |
| 3820 if (IsTableLikeRole()) { | 3820 if (IsTableLikeRole()) { |
| 3821 IntAttributeToIA2(ui::AX_ATTR_ARIA_COL_COUNT, "colcount"); | 3821 IntAttributeToIA2(ui::AX_ATTR_ARIA_COLUMN_COUNT, "colcount"); |
| 3822 IntAttributeToIA2(ui::AX_ATTR_ARIA_ROW_COUNT, "rowcount"); | 3822 IntAttributeToIA2(ui::AX_ATTR_ARIA_ROW_COUNT, "rowcount"); |
| 3823 } | 3823 } |
| 3824 | 3824 |
| 3825 // Expose aria-colindex and aria-rowindex in a cell or row. | 3825 // Expose aria-colindex and aria-rowindex in a cell or row. |
| 3826 if (IsCellOrTableHeaderRole() || GetRole() == ui::AX_ROLE_ROW) { | 3826 if (IsCellOrTableHeaderRole() || GetRole() == ui::AX_ROLE_ROW) { |
| 3827 if (GetRole() != ui::AX_ROLE_ROW) | 3827 if (GetRole() != ui::AX_ROLE_ROW) |
| 3828 IntAttributeToIA2(ui::AX_ATTR_ARIA_COL_INDEX, "colindex"); | 3828 IntAttributeToIA2(ui::AX_ATTR_ARIA_CELL_COLUMN_INDEX, "colindex"); |
| 3829 IntAttributeToIA2(ui::AX_ATTR_ARIA_ROW_INDEX, "rowindex"); | 3829 IntAttributeToIA2(ui::AX_ATTR_ARIA_CELL_ROW_INDEX, "rowindex"); |
| 3830 } | 3830 } |
| 3831 | 3831 |
| 3832 // Expose row or column header sort direction. | 3832 // Expose row or column header sort direction. |
| 3833 int32_t sort_direction; | 3833 int32_t sort_direction; |
| 3834 if ((ia_role() == ROLE_SYSTEM_COLUMNHEADER || | 3834 if ((ia_role() == ROLE_SYSTEM_COLUMNHEADER || |
| 3835 ia_role() == ROLE_SYSTEM_ROWHEADER) && | 3835 ia_role() == ROLE_SYSTEM_ROWHEADER) && |
| 3836 GetIntAttribute(ui::AX_ATTR_SORT_DIRECTION, &sort_direction)) { | 3836 GetIntAttribute(ui::AX_ATTR_SORT_DIRECTION, &sort_direction)) { |
| 3837 switch (static_cast<ui::AXSortDirection>(sort_direction)) { | 3837 switch (static_cast<ui::AXSortDirection>(sort_direction)) { |
| 3838 case ui::AX_SORT_DIRECTION_NONE: | 3838 case ui::AX_SORT_DIRECTION_NONE: |
| 3839 break; | 3839 break; |
| (...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5672 return static_cast<BrowserAccessibilityWin*>(obj); | 5672 return static_cast<BrowserAccessibilityWin*>(obj); |
| 5673 } | 5673 } |
| 5674 | 5674 |
| 5675 const BrowserAccessibilityWin* | 5675 const BrowserAccessibilityWin* |
| 5676 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) { | 5676 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) { |
| 5677 DCHECK(!obj || obj->IsNative()); | 5677 DCHECK(!obj || obj->IsNative()); |
| 5678 return static_cast<const BrowserAccessibilityWin*>(obj); | 5678 return static_cast<const BrowserAccessibilityWin*>(obj); |
| 5679 } | 5679 } |
| 5680 | 5680 |
| 5681 } // namespace content | 5681 } // namespace content |
| OLD | NEW |