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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 return; | 70 return; |
71 } | 71 } |
72 | 72 |
73 if (!layout_object->IsTable()) | 73 if (!layout_object->IsTable()) |
74 return; | 74 return; |
75 | 75 |
76 LayoutTable* table = ToLayoutTable(layout_object); | 76 LayoutTable* table = ToLayoutTable(layout_object); |
77 LayoutTableSection* table_section = table->TopSection(); | 77 LayoutTableSection* table_section = table->TopSection(); |
78 for (; table_section; | 78 for (; table_section; |
79 table_section = table->SectionBelow(table_section, kSkipEmptySections)) { | 79 table_section = table->SectionBelow(table_section, kSkipEmptySections)) { |
80 unsigned num_cols = table_section->NumEffectiveColumns(); | 80 unsigned num_cols = table_section->MaxNumEffectiveColumnsOfRows(); |
81 if (column_index_ >= num_cols) | 81 if (column_index_ >= num_cols) |
82 continue; | 82 continue; |
83 unsigned num_rows = table_section->NumRows(); | 83 unsigned num_rows = table_section->NumRows(); |
84 for (unsigned r = 0; r < num_rows; r++) { | 84 for (unsigned r = 0; r < num_rows; r++) { |
85 LayoutTableCell* layout_cell = | 85 LayoutTableCell* layout_cell = |
86 table_section->PrimaryCellAt(r, column_index_); | 86 table_section->PrimaryCellAt(r, column_index_); |
87 if (!layout_cell) | 87 if (!layout_cell) |
88 continue; | 88 continue; |
89 | 89 |
90 AXObjectImpl* cell = AxObjectCache().GetOrCreate(layout_cell->GetNode()); | 90 AXObjectImpl* cell = AxObjectCache().GetOrCreate(layout_cell->GetNode()); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 // make sure the last one isn't the same as this one (rowspan cells) | 139 // make sure the last one isn't the same as this one (rowspan cells) |
140 if (children_.size() > 0 && children_.back() == cell) | 140 if (children_.size() > 0 && children_.back() == cell) |
141 continue; | 141 continue; |
142 | 142 |
143 children_.push_back(cell); | 143 children_.push_back(cell); |
144 } | 144 } |
145 } | 145 } |
146 | 146 |
147 } // namespace blink | 147 } // namespace blink |
OLD | NEW |