OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/renderer/accessibility/blink_ax_tree_source.h" | 5 #include "content/renderer/accessibility/blink_ax_tree_source.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 } | 699 } |
700 } | 700 } |
701 cell_ids.push_back(cell_id); | 701 cell_ids.push_back(cell_id); |
702 } | 702 } |
703 dst->AddIntListAttribute(ui::AX_ATTR_CELL_IDS, cell_ids); | 703 dst->AddIntListAttribute(ui::AX_ATTR_CELL_IDS, cell_ids); |
704 dst->AddIntListAttribute(ui::AX_ATTR_UNIQUE_CELL_IDS, unique_cell_ids); | 704 dst->AddIntListAttribute(ui::AX_ATTR_UNIQUE_CELL_IDS, unique_cell_ids); |
705 } | 705 } |
706 | 706 |
707 int aria_colcount = src.AriaColumnCount(); | 707 int aria_colcount = src.AriaColumnCount(); |
708 if (aria_colcount) | 708 if (aria_colcount) |
709 dst->AddIntAttribute(ui::AX_ATTR_ARIA_COL_COUNT, aria_colcount); | 709 dst->AddIntAttribute(ui::AX_ATTR_ARIA_COLUMN_COUNT, aria_colcount); |
710 | 710 |
711 int aria_rowcount = src.AriaRowCount(); | 711 int aria_rowcount = src.AriaRowCount(); |
712 if (aria_rowcount) | 712 if (aria_rowcount) |
713 dst->AddIntAttribute(ui::AX_ATTR_ARIA_ROW_COUNT, aria_rowcount); | 713 dst->AddIntAttribute(ui::AX_ATTR_ARIA_ROW_COUNT, aria_rowcount); |
714 } | 714 } |
715 | 715 |
716 if (dst->role == ui::AX_ROLE_ROW) { | 716 if (dst->role == ui::AX_ROLE_ROW) { |
717 dst->AddIntAttribute(ui::AX_ATTR_TABLE_ROW_INDEX, src.RowIndex()); | 717 dst->AddIntAttribute(ui::AX_ATTR_TABLE_ROW_INDEX, src.RowIndex()); |
718 WebAXObject header = src.RowHeader(); | 718 WebAXObject header = src.RowHeader(); |
719 if (!header.IsDetached()) | 719 if (!header.IsDetached()) |
(...skipping 15 matching lines...) Expand all Loading... |
735 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_COLUMN_INDEX, | 735 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_COLUMN_INDEX, |
736 src.CellColumnIndex()); | 736 src.CellColumnIndex()); |
737 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_COLUMN_SPAN, | 737 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_COLUMN_SPAN, |
738 src.CellColumnSpan()); | 738 src.CellColumnSpan()); |
739 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_INDEX, | 739 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_INDEX, |
740 src.CellRowIndex()); | 740 src.CellRowIndex()); |
741 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_SPAN, | 741 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_SPAN, |
742 src.CellRowSpan()); | 742 src.CellRowSpan()); |
743 | 743 |
744 int aria_colindex = src.AriaColumnIndex(); | 744 int aria_colindex = src.AriaColumnIndex(); |
745 if (aria_colindex) | 745 if (aria_colindex) { |
746 dst->AddIntAttribute(ui::AX_ATTR_ARIA_COL_INDEX, aria_colindex); | 746 dst->AddIntAttribute(ui::AX_ATTR_ARIA_CELL_COLUMN_INDEX, |
| 747 aria_colindex); |
| 748 } |
747 } | 749 } |
748 | 750 |
749 int aria_rowindex = src.AriaRowIndex(); | 751 int aria_rowindex = src.AriaRowIndex(); |
750 if (aria_rowindex) | 752 if (aria_rowindex) |
751 dst->AddIntAttribute(ui::AX_ATTR_ARIA_ROW_INDEX, aria_rowindex); | 753 dst->AddIntAttribute(ui::AX_ATTR_ARIA_CELL_ROW_INDEX, aria_rowindex); |
752 } | 754 } |
753 | 755 |
754 if ((dst->role == ui::AX_ROLE_ROW_HEADER || | 756 if ((dst->role == ui::AX_ROLE_ROW_HEADER || |
755 dst->role == ui::AX_ROLE_COLUMN_HEADER) && | 757 dst->role == ui::AX_ROLE_COLUMN_HEADER) && |
756 src.SortDirection()) { | 758 src.SortDirection()) { |
757 dst->AddIntAttribute(ui::AX_ATTR_SORT_DIRECTION, | 759 dst->AddIntAttribute(ui::AX_ATTR_SORT_DIRECTION, |
758 AXSortDirectionFromBlink(src.SortDirection())); | 760 AXSortDirectionFromBlink(src.SortDirection())); |
759 } | 761 } |
760 } | 762 } |
761 | 763 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 return WebAXObject(); | 889 return WebAXObject(); |
888 | 890 |
889 WebDocument document = render_frame_->GetWebFrame()->GetDocument(); | 891 WebDocument document = render_frame_->GetWebFrame()->GetDocument(); |
890 if (!document.IsNull()) | 892 if (!document.IsNull()) |
891 return document.AccessibilityObject(); | 893 return document.AccessibilityObject(); |
892 | 894 |
893 return WebAXObject(); | 895 return WebAXObject(); |
894 } | 896 } |
895 | 897 |
896 } // namespace content | 898 } // namespace content |
OLD | NEW |