OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 LayoutTable* table = toLayoutTable(renderer); | 95 LayoutTable* table = toLayoutTable(renderer); |
96 LayoutTableSection* tableSection = table->topSection(); | 96 LayoutTableSection* tableSection = table->topSection(); |
97 for (; tableSection; tableSection = table->sectionBelow(tableSection, SkipEm
ptySections)) { | 97 for (; tableSection; tableSection = table->sectionBelow(tableSection, SkipEm
ptySections)) { |
98 unsigned numRows = tableSection->numRows(); | 98 unsigned numRows = tableSection->numRows(); |
99 for (unsigned r = 0; r < numRows; r++) { | 99 for (unsigned r = 0; r < numRows; r++) { |
100 LayoutTableCell* layoutCell = tableSection->primaryCellAt(r, m_colum
nIndex); | 100 LayoutTableCell* layoutCell = tableSection->primaryCellAt(r, m_colum
nIndex); |
101 if (!layoutCell) | 101 if (!layoutCell) |
102 continue; | 102 continue; |
103 | 103 |
104 // Whenever cell's col is less then current column index, we've foun
d the cell with colspan. | 104 // Whenever cell's effective col is less then current column index,
we've found the cell with colspan. |
105 // We do not need to add this cell, it's already been added. | 105 // We do not need to add this cell, it's already been added. |
106 if (layoutCell->col() < m_columnIndex) | 106 if (layoutCell->table()->colToEffCol(layoutCell->col()) < m_columnIn
dex) |
107 continue; | 107 continue; |
108 | 108 |
109 AXObject* cell = axObjectCache()->getOrCreate(layoutCell->node()); | 109 AXObject* cell = axObjectCache()->getOrCreate(layoutCell->node()); |
110 if (!cell || !cell->isTableCell()) | 110 if (!cell || !cell->isTableCell()) |
111 continue; | 111 continue; |
112 | 112 |
113 if (toAXTableCell(cell)->scanToDecideHeaderRole() == ColumnHeaderRol
e) | 113 if (toAXTableCell(cell)->scanToDecideHeaderRole() == ColumnHeaderRol
e) |
114 headers.append(cell); | 114 headers.append(cell); |
115 } | 115 } |
116 } | 116 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // make sure the last one isn't the same as this one (rowspan cells) | 227 // make sure the last one isn't the same as this one (rowspan cells) |
228 if (m_children.size() > 0 && m_children.last() == cell) | 228 if (m_children.size() > 0 && m_children.last() == cell) |
229 continue; | 229 continue; |
230 | 230 |
231 m_children.append(cell); | 231 m_children.append(cell); |
232 m_columnRect.unite(cell->elementRect()); | 232 m_columnRect.unite(cell->elementRect()); |
233 } | 233 } |
234 } | 234 } |
235 | 235 |
236 } // namespace blink | 236 } // namespace blink |
OLD | NEW |