OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 for (RefPtr<AXObject> child = firstChild(); child; child = child->nextSiblin
g()) { | 100 for (RefPtr<AXObject> child = firstChild(); child; child = child->nextSiblin
g()) { |
101 | 101 |
102 if (!addTableCellChild(child.get(), appendedRows, columnCount)) { | 102 if (!addTableCellChild(child.get(), appendedRows, columnCount)) { |
103 | 103 |
104 // in case the layout tree doesn't match the expected ARIA hierarchy
, look at the children | 104 // in case the layout tree doesn't match the expected ARIA hierarchy
, look at the children |
105 if (!child->hasChildren()) | 105 if (!child->hasChildren()) |
106 child->addChildren(); | 106 child->addChildren(); |
107 | 107 |
108 // The children of this non-row will contain all non-ignored element
s (recursing to find them). | 108 // The children of this non-row will contain all non-ignored element
s (recursing to find them). |
109 // This allows the table to dive arbitrarily deep to find the rows. | 109 // This allows the table to dive arbitrarily deep to find the rows. |
110 AccessibilityChildrenVector children = child->children(); | 110 const AccessibilityChildrenVector& children = child->children(); |
111 size_t length = children.size(); | 111 size_t length = children.size(); |
112 for (size_t i = 0; i < length; ++i) | 112 for (size_t i = 0; i < length; ++i) |
113 addTableCellChild(children[i].get(), appendedRows, columnCount); | 113 addTableCellChild(children[i].get(), appendedRows, columnCount); |
114 } | 114 } |
115 } | 115 } |
116 | 116 |
117 // make the columns based on the number of columns in the first body | 117 // make the columns based on the number of columns in the first body |
118 for (unsigned i = 0; i < columnCount; ++i) { | 118 for (unsigned i = 0; i < columnCount; ++i) { |
119 AXTableColumn* column = toAXTableColumn(axCache->getOrCreate(ColumnRole)
); | 119 AXTableColumn* column = toAXTableColumn(axCache->getOrCreate(ColumnRole)
); |
120 column->setColumnIndex((int)i); | 120 column->setColumnIndex((int)i); |
121 column->setParent(this); | 121 column->setParent(this); |
122 m_columns.append(column); | 122 m_columns.append(column); |
123 if (!column->accessibilityIsIgnored()) | 123 if (!column->accessibilityIsIgnored()) |
124 m_children.append(column); | 124 m_children.append(column); |
125 } | 125 } |
126 | 126 |
127 AXObject* headerContainerObject = headerContainer(); | 127 AXObject* headerContainerObject = headerContainer(); |
128 if (headerContainerObject && !headerContainerObject->accessibilityIsIgnored(
)) | 128 if (headerContainerObject && !headerContainerObject->accessibilityIsIgnored(
)) |
129 m_children.append(headerContainerObject); | 129 m_children.append(headerContainerObject); |
130 } | 130 } |
131 | 131 |
132 } // namespace blink | 132 } // namespace blink |
OLD | NEW |