Chromium Code Reviews

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

Issue 2630723002: Fix blink_perf.paint regression about tables (Closed)
Patch Set: Issues fixed in patch set 4 Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 64 matching lines...)
75 75
76 LayoutTable* table = toLayoutTable(layoutObject); 76 LayoutTable* table = toLayoutTable(layoutObject);
77 LayoutTableSection* tableSection = table->topSection(); 77 LayoutTableSection* tableSection = table->topSection();
78 for (; tableSection; 78 for (; tableSection;
79 tableSection = table->sectionBelow(tableSection, SkipEmptySections)) { 79 tableSection = table->sectionBelow(tableSection, SkipEmptySections)) {
80 unsigned numCols = tableSection->numEffectiveColumns(); 80 unsigned numCols = tableSection->numEffectiveColumns();
81 if (m_columnIndex >= numCols) 81 if (m_columnIndex >= numCols)
82 continue; 82 continue;
83 unsigned numRows = tableSection->numRows(); 83 unsigned numRows = tableSection->numRows();
84 for (unsigned r = 0; r < numRows; r++) { 84 for (unsigned r = 0; r < numRows; r++) {
85 if (m_columnIndex >= tableSection->numCols(r))
86 continue;
85 LayoutTableCell* layoutCell = 87 LayoutTableCell* layoutCell =
86 tableSection->primaryCellAt(r, m_columnIndex); 88 tableSection->primaryCellAt(r, m_columnIndex);
87 if (!layoutCell) 89 if (!layoutCell)
88 continue; 90 continue;
89 91
90 AXObject* cell = axObjectCache().getOrCreate(layoutCell->node()); 92 AXObject* cell = axObjectCache().getOrCreate(layoutCell->node());
91 if (!cell || !cell->isTableCell() || headers.contains(cell)) 93 if (!cell || !cell->isTableCell() || headers.contains(cell))
92 continue; 94 continue;
93 95
94 if (toAXTableCell(cell)->scanToDecideHeaderRole() == ColumnHeaderRole) 96 if (toAXTableCell(cell)->scanToDecideHeaderRole() == ColumnHeaderRole)
(...skipping 43 matching lines...)
138 140
139 // make sure the last one isn't the same as this one (rowspan cells) 141 // make sure the last one isn't the same as this one (rowspan cells)
140 if (m_children.size() > 0 && m_children.back() == cell) 142 if (m_children.size() > 0 && m_children.back() == cell)
141 continue; 143 continue;
142 144
143 m_children.push_back(cell); 145 m_children.push_back(cell);
144 } 146 }
145 } 147 }
146 148
147 } // namespace blink 149 } // namespace blink
OLDNEW

Powered by Google App Engine