Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXTableColumn.cpp

Issue 2884573002: Replace LayoutTableCell::AbsoluteColumnIndex() with EffectiveColumnIndex()
Patch Set: - Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698