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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
695 dst->AddIntListAttribute(ui::AX_ATTR_CELL_IDS, cell_ids); | 695 dst->AddIntListAttribute(ui::AX_ATTR_CELL_IDS, cell_ids); |
696 dst->AddIntListAttribute(ui::AX_ATTR_UNIQUE_CELL_IDS, unique_cell_ids); | 696 dst->AddIntListAttribute(ui::AX_ATTR_UNIQUE_CELL_IDS, unique_cell_ids); |
697 } | 697 } |
698 } | 698 } |
699 | 699 |
700 if (dst->role == ui::AX_ROLE_TABLE || | 700 if (dst->role == ui::AX_ROLE_TABLE || |
701 dst->role == ui::AX_ROLE_GRID || | 701 dst->role == ui::AX_ROLE_GRID || |
702 dst->role == ui::AX_ROLE_TREE_GRID) { | 702 dst->role == ui::AX_ROLE_TREE_GRID) { |
703 int aria_colcount = src.ariaColumnCount(); | 703 int aria_colcount = src.ariaColumnCount(); |
704 if (aria_colcount) | 704 if (aria_colcount) |
705 dst->AddIntAttribute(ui::AX_ATTR_ARIA_COL_COUNT, aria_colcount); | 705 dst->AddIntAttribute(ui::AX_ATTR_ARIA_COLUMN_COUNT, aria_colcount); |
706 | 706 |
707 int aria_rowcount = src.ariaRowCount(); | 707 int aria_rowcount = src.ariaRowCount(); |
708 if (aria_rowcount) | 708 if (aria_rowcount) |
709 dst->AddIntAttribute(ui::AX_ATTR_ARIA_ROW_COUNT, aria_rowcount); | 709 dst->AddIntAttribute(ui::AX_ATTR_ARIA_ROW_COUNT, aria_rowcount); |
710 } | 710 } |
711 | 711 |
712 if (dst->role == ui::AX_ROLE_ROW) { | 712 if (dst->role == ui::AX_ROLE_ROW) { |
713 dst->AddIntAttribute(ui::AX_ATTR_TABLE_ROW_INDEX, src.rowIndex()); | 713 dst->AddIntAttribute(ui::AX_ATTR_TABLE_ROW_INDEX, src.rowIndex()); |
714 WebAXObject header = src.rowHeader(); | 714 WebAXObject header = src.rowHeader(); |
715 if (!header.isDetached()) | 715 if (!header.isDetached()) |
(...skipping 15 matching lines...) Expand all Loading... | |
731 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_COLUMN_INDEX, | 731 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_COLUMN_INDEX, |
732 src.cellColumnIndex()); | 732 src.cellColumnIndex()); |
733 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_COLUMN_SPAN, | 733 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_COLUMN_SPAN, |
734 src.cellColumnSpan()); | 734 src.cellColumnSpan()); |
735 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_INDEX, | 735 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_INDEX, |
736 src.cellRowIndex()); | 736 src.cellRowIndex()); |
737 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_SPAN,src.cellRowSpan()); | 737 dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_SPAN,src.cellRowSpan()); |
738 | 738 |
739 int aria_colindex = src.ariaColumnIndex(); | 739 int aria_colindex = src.ariaColumnIndex(); |
740 if (aria_colindex) | 740 if (aria_colindex) |
741 dst->AddIntAttribute(ui::AX_ATTR_ARIA_COL_INDEX, aria_colindex); | 741 dst->AddIntAttribute(ui::AX_ATTR_ARIA_CELL_COLUMN_INDEX, |
dmazzoni
2017/04/11 02:57:38
nit: this needs braces now
| |
742 aria_colindex); | |
742 } | 743 } |
743 | 744 |
744 int aria_rowindex = src.ariaRowIndex(); | 745 int aria_rowindex = src.ariaRowIndex(); |
745 if (aria_rowindex) | 746 if (aria_rowindex) |
746 dst->AddIntAttribute(ui::AX_ATTR_ARIA_ROW_INDEX, aria_rowindex); | 747 dst->AddIntAttribute(ui::AX_ATTR_ARIA_CELL_ROW_INDEX, aria_rowindex); |
747 } | 748 } |
748 | 749 |
749 if ((dst->role == ui::AX_ROLE_ROW_HEADER || | 750 if ((dst->role == ui::AX_ROLE_ROW_HEADER || |
750 dst->role == ui::AX_ROLE_COLUMN_HEADER) && src.sortDirection()) { | 751 dst->role == ui::AX_ROLE_COLUMN_HEADER) && src.sortDirection()) { |
751 dst->AddIntAttribute(ui::AX_ATTR_SORT_DIRECTION, | 752 dst->AddIntAttribute(ui::AX_ATTR_SORT_DIRECTION, |
752 AXSortDirectionFromBlink(src.sortDirection())); | 753 AXSortDirectionFromBlink(src.sortDirection())); |
753 } | 754 } |
754 } | 755 } |
755 | 756 |
756 // The majority of the rest of this code computes attributes needed for | 757 // The majority of the rest of this code computes attributes needed for |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
883 return WebAXObject(); | 884 return WebAXObject(); |
884 | 885 |
885 WebDocument document = render_frame_->GetWebFrame()->document(); | 886 WebDocument document = render_frame_->GetWebFrame()->document(); |
886 if (!document.isNull()) | 887 if (!document.isNull()) |
887 return document.accessibilityObject(); | 888 return document.accessibilityObject(); |
888 | 889 |
889 return WebAXObject(); | 890 return WebAXObject(); |
890 } | 891 } |
891 | 892 |
892 } // namespace content | 893 } // namespace content |
OLD | NEW |