Changeset 64225 in webkit
- Timestamp:
- Jul 28, 2010 1:07:19 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64218 r64225 1 2010-07-28 fsamuel@chromium.org <fsamuel@chromium.org> 2 3 Reviewed by David Hyatt. 4 5 REGRESSION (r63994): Bank of America's home page is horribly mis-rendered 6 https://bugs.webkit.org/show_bug.cgi?id=42993 7 8 Restored the expectation for the slashdot logo table test. 9 10 Added a new layout test to check for the correctness of early table layout. 11 12 * fast/table/early-table-layout.html: Added. 13 * platform/chromium/test_expectations.txt: 14 * platform/gtk/fast/table/early-table-layout-expected.checksum: Added. 15 * platform/gtk/fast/table/early-table-layout-expected.png: Added. 16 * platform/gtk/fast/table/early-table-layout-expected.txt: Added. 17 1 18 2010-07-28 Victor Wang <victorw@chromium.org> 2 19 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r64218 r64225 67 67 BUG24182 SLOW : http/tests/xmlhttprequest/simple-cross-origin-progress-events.html = PASS 68 68 BUG24182 SLOW WIN MAC : svg/custom/invisible-text-after-scrolling.xhtml = PASS 69 BUG24182 SLOW : tables/mozilla/other/slashlogo.html = PASS 69 70 BUG24182 SLOW WIN RELEASE : tables/mozilla/bugs/bug113235-1.html = PASS 70 71 BUG24182 SLOW DEBUG : fast/js/toString-and-valueOf-override.html = PASS -
trunk/WebCore/ChangeLog
r64213 r64225 1 2010-07-28 fsamuel@chromium.org <fsamuel@chromium.org> 2 3 Reviewed by David Hyatt. 4 5 REGRESSION (r63994): Bank of America's home page is horribly mis-rendered 6 https://bugs.webkit.org/show_bug.cgi?id=42993 7 8 Fixed bug introduced by patch for bug 40775. 9 10 The new table rendering code did not take into account table layouts starting 11 during a partial construction of the table render tree. As such, 12 multiple layouts on the same table resulted in more columns being generated. 13 This patch solves this issue. 14 15 * rendering/AutoTableLayout.cpp: 16 (WebCore::AutoTableLayout::recalcColumn): 17 * rendering/RenderTable.cpp: 18 (WebCore::RenderTable::cellAbove): 19 (WebCore::RenderTable::cellBelow): 20 (WebCore::RenderTable::cellBefore): 21 * rendering/RenderTableSection.cpp: 22 (WebCore::RenderTableSection::ensureRows): 23 (WebCore::RenderTableSection::addCell): 24 (WebCore::RenderTableSection::setCellWidths): 25 (WebCore::RenderTableSection::calcRowHeight): 26 (WebCore::RenderTableSection::layoutRows): 27 (WebCore::RenderTableSection::paintObject): 28 (WebCore::RenderTableSection::appendColumn): 29 (WebCore::RenderTableSection::splitColumn): 30 * rendering/RenderTableSection.h: 31 (WebCore::RenderTableSection::CellStruct::CellStruct): 32 1 33 2010-07-28 Tony Gentilcore <tonyg@chromium.org> 2 34 -
trunk/WebCore/rendering/AutoTableLayout.cpp
r63994 r64225 126 126 } 127 127 } else { 128 if (cell && (!effCol || cell->section()->primaryCellAt(i, effCol-1) != cell)) {128 if (cell && (!effCol || section->primaryCellAt(i, effCol-1) != cell)) { 129 129 // This spanning cell originates in this column. Ensure we have 130 130 // a min/max width of at least 1px for this column now. -
trunk/WebCore/rendering/RenderTable.cpp
r63994 r64225 1020 1020 if (section) { 1021 1021 int effCol = colToEffCol(cell->col()); 1022 RenderTableSection::CellStruct aboveCell; 1023 // If we hit a span back up to a real cell. 1024 do { 1025 aboveCell = section->cellAt(rAbove, effCol); 1026 effCol--; 1027 } while (!aboveCell.hasCells() && aboveCell.inColSpan && effCol >= 0); 1022 RenderTableSection::CellStruct& aboveCell = section->cellAt(rAbove, effCol); 1028 1023 return aboveCell.primaryCell(); 1029 1024 } else … … 1052 1047 if (section) { 1053 1048 int effCol = colToEffCol(cell->col()); 1054 RenderTableSection::CellStruct belowCell; 1055 // If we hit a colspan back up to a real cell. 1056 do { 1057 belowCell = section->cellAt(rBelow, effCol); 1058 effCol--; 1059 } while (!belowCell.hasCells() && belowCell.inColSpan && effCol >= 0); 1049 RenderTableSection::CellStruct& belowCell = section->cellAt(rBelow, effCol); 1060 1050 return belowCell.primaryCell(); 1061 1051 } else … … 1073 1063 1074 1064 // If we hit a colspan back up to a real cell. 1075 RenderTableSection::CellStruct prevCell; 1076 do { 1077 prevCell = section->cellAt(cell->row(), effCol - 1); 1078 effCol--; 1079 } while (!prevCell.hasCells() && prevCell.inColSpan && effCol >= 0); 1065 RenderTableSection::CellStruct& prevCell = section->cellAt(cell->row(), effCol - 1); 1080 1066 return prevCell.primaryCell(); 1081 1067 } -
trunk/WebCore/rendering/RenderTableSection.cpp
r63994 r64225 162 162 m_gridRows = numRows; 163 163 int nCols = max(1, table()->numEffCols()); 164 CellStruct emptyCellStruct;165 emptyCellStruct.inColSpan = false;166 emptyCellStruct.empty = false;167 164 for (int r = nRows; r < numRows; r++) { 168 165 m_grid[r].row = new Row(nCols); 169 m_grid[r].row->fill(emptyCellStruct);170 166 m_grid[r].rowRenderer = 0; 171 167 m_grid[r].baseline = 0; … … 192 188 while (m_cCol < nCols && (cellAt(m_cRow, m_cCol).hasCells() || cellAt(m_cRow, m_cCol).inColSpan)) 193 189 m_cCol++; 190 194 191 if (rSpan == 1) { 195 192 // we ignore height settings on rowspan cells … … 225 222 bool inColSpan = false; 226 223 while (cSpan) { 227 int currentSpan;228 if (m_cCol >= nCols) {229 table()->appendColumn(cSpan);230 currentSpan = cSpan;231 } else {232 if (cSpan < (int)columns[m_cCol].span)233 table()->splitColumn(m_cCol, cSpan);234 currentSpan = columns[m_cCol].span;235 }236 for (int r = 0; r < rSpan; r++) {237 CellStruct& c = cellAt(m_cRow + r, m_cCol);238 ASSERT(cell);239 c.cells.append(cell);240 // If cells overlap then we take the slow path for painting.241 if (c.cells.size() > 1)242 m_hasMultipleCellLevels = true;243 if (inColSpan)244 c.inColSpan = true;245 }246 m_cCol++;247 cSpan -= currentSpan;248 inColSpan = true;224 int currentSpan; 225 if (m_cCol >= nCols) { 226 table()->appendColumn(cSpan); 227 currentSpan = cSpan; 228 } else { 229 if (cSpan < (int)columns[m_cCol].span) 230 table()->splitColumn(m_cCol, cSpan); 231 currentSpan = columns[m_cCol].span; 232 } 233 for (int r = 0; r < rSpan; r++) { 234 CellStruct& c = cellAt(m_cRow + r, m_cCol); 235 ASSERT(cell); 236 c.cells.append(cell); 237 // If cells overlap then we take the slow path for painting. 238 if (c.cells.size() > 1) 239 m_hasMultipleCellLevels = true; 240 if (inColSpan) 241 c.inColSpan = true; 242 } 243 m_cCol++; 244 cSpan -= currentSpan; 245 inColSpan = true; 249 246 } 250 247 cell->setRow(m_cRow); … … 261 258 Row& row = *m_grid[i].row; 262 259 int cols = row.size(); 263 RenderTableCell* lastCell = 0;264 260 for (int j = 0; j < cols; j++) { 265 261 CellStruct& current = row[j]; 266 262 RenderTableCell* cell = current.primaryCell(); 267 if (!cell) { 268 ASSERT(lastCell || !current.inColSpan); 269 if (lastCell) 270 current.cells.append(lastCell); 271 if (!current.inColSpan) 272 current.empty = true; 263 if (!cell || current.inColSpan) 273 264 continue; 274 }275 if (current.inColSpan || current.empty)276 continue;277 lastCell = cell;278 265 int endCol = j; 279 266 int cspan = cell->colSpan(); … … 336 323 CellStruct& current = cellAt(r, c); 337 324 cell = current.primaryCell(); 338 ASSERT(cell || current.empty); 339 if (!cell || current. empty || current.inColSpan)325 326 if (!cell || current.inColSpan) 340 327 continue; 341 328 … … 512 499 RenderTableCell* cell = cs.primaryCell(); 513 500 514 if (!cell || cs. empty || cs.inColSpan)501 if (!cell || cs.inColSpan) 515 502 continue; 516 503 … … 652 639 CellStruct& cs = cellAt(r, c); 653 640 RenderTableCell* cell = cs.primaryCell(); 654 if (!cell || cs. empty || cs.inColSpan)641 if (!cell || cs.inColSpan) 655 642 continue; 656 643 if (r < totalRows - 1 && cell == primaryCellAt(r + 1, c)) … … 1065 1052 CellStruct& current = cellAt(r, c); 1066 1053 RenderTableCell* cell = current.primaryCell(); 1067 if ( current.empty|| (r > startrow && primaryCellAt(r - 1, c) == cell) || (c > startcol && primaryCellAt(r, c - 1) == cell))1054 if (!cell || (r > startrow && primaryCellAt(r - 1, c) == cell) || (c > startcol && primaryCellAt(r, c - 1) == cell)) 1068 1055 continue; 1069 1056 paintCell(cell, paintInfo, tx, ty); … … 1077 1064 for (unsigned c = startcol; c < endcol; c++) { 1078 1065 CellStruct& current = cellAt(r, c); 1079 if ( current.empty)1066 if (!current.hasCells()) 1080 1067 continue; 1081 1068 for (unsigned i = 0; i < current.cells.size(); ++i) { … … 1157 1144 void RenderTableSection::appendColumn(int pos) 1158 1145 { 1159 for (int row = 0; row < m_gridRows; ++row) {1146 for (int row = 0; row < m_gridRows; ++row) 1160 1147 m_grid[row].row->resize(pos + 1); 1161 CellStruct& c = cellAt(row, pos);1162 c.inColSpan = false;1163 c.empty = false;1164 }1165 1148 } 1166 1149 … … 1184 1167 r[pos + 1].inColSpan = 0; 1185 1168 } 1186 r[pos + 1].empty = false;1187 1169 } 1188 1170 } -
trunk/WebCore/rendering/RenderTableSection.h
r63994 r64225 57 57 Vector<RenderTableCell*, 1> cells; 58 58 bool inColSpan; // true for columns after the first in a colspan 59 bool empty;60 59 61 60 CellStruct(): 62 inColSpan(false), 63 empty(false) {} 64 65 CellStruct(const CellStruct& other): 66 cells(other.cells), 67 inColSpan(other.inColSpan), 68 empty(other.empty) {} 61 inColSpan(false) {} 69 62 70 63 RenderTableCell* primaryCell()
Note: See TracChangeset
for help on using the changeset viewer.