Changeset 122408 in webkit
- Timestamp:
- Jul 11, 2012, 7:38:38 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r122406 r122408 1 2012-07-11 Dan Bernstein <mitz@apple.com> 2 3 When a table row height grows because of pagination, not all cells’ heights are adjusted 4 https://bugs.webkit.org/show_bug.cgi?id=91043 5 6 Reviewed by Sam Weinig. 7 8 * fast/multicol/table-row-height-increase-expected.html: Added. 9 * fast/multicol/table-row-height-increase.html: Added. 10 1 11 2012-07-11 Ojan Vafai <ojan@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r122404 r122408 1 2012-07-11 Dan Bernstein <mitz@apple.com> 2 3 When a table row height grows because of pagination, not all cells’ heights are adjusted 4 https://bugs.webkit.org/show_bug.cgi?id=91043 5 6 Reviewed by Sam Weinig. 7 8 The fix for in bug <http://webkit.org/b/83595> in <http://trac.webkit.org/r113738> made table 9 rows grow as necessary to fit cells that grow as a result of pagination. But it had two bad 10 side effects: earlier cells on the row would not grow by the same amount, and later cells on 11 the row would factor the existing growth into their intrinsic padding. 12 13 Test: fast/multicol/table-row-height-increase.html 14 15 * rendering/RenderTableSection.cpp: 16 (WebCore::RenderTableSection::layoutRows): Now when a cell becomes taller than the row height, 17 the additional height needed is recorded, and the cell is shrunk back to row height. Then 18 after finishing the row, all cells occurring on the row (including cells spanning it but not 19 starting on it) are grown by the same amount. 20 1 21 2012-07-11 Mark Rowe <mrowe@apple.com> 2 22 -
trunk/Source/WebCore/rendering/RenderTableSection.cpp
r121096 r122408 548 548 } 549 549 550 int rowHeightIncreaseForPagination = 0; 551 550 552 for (unsigned c = 0; c < nEffCols; c++) { 551 553 CellStruct& cs = cellAt(r, c); … … 672 674 // We'll also do a basic increase of the row height to accommodate the cell if it's bigger, but this isn't quite right 673 675 // either. It's at least stable though and won't result in an infinite # of relayouts that may never stabilize. 674 if (cell->logicalHeight() > rHeight) { 675 unsigned delta = cell->logicalHeight() - rHeight; 676 for (unsigned rowIndex = rindx + cell->rowSpan(); rowIndex <= totalRows; rowIndex++) 677 m_rowPos[rowIndex] += delta; 678 rHeight = cell->logicalHeight(); 679 } else 680 cell->setLogicalHeight(rHeight); 676 if (cell->logicalHeight() > rHeight) 677 rowHeightIncreaseForPagination = max<int>(rowHeightIncreaseForPagination, cell->logicalHeight() - rHeight); 678 cell->setLogicalHeight(rHeight); 681 679 } 682 680 … … 690 688 if (!table()->selfNeedsLayout() && cell->checkForRepaintDuringLayout()) 691 689 cell->repaintDuringLayoutIfMoved(oldCellRect); 690 } 691 } 692 if (rowHeightIncreaseForPagination) { 693 for (unsigned rowIndex = r + 1; rowIndex <= totalRows; rowIndex++) 694 m_rowPos[rowIndex] += rowHeightIncreaseForPagination; 695 for (unsigned c = 0; c < nEffCols; ++c) { 696 Vector<RenderTableCell*, 1>& cells = cellAt(r, c).cells; 697 for (size_t i = 0; i < cells.size(); ++i) 698 cells[i]->setLogicalHeight(cells[i]->logicalHeight() + rowHeightIncreaseForPagination); 692 699 } 693 700 }
Note:
See TracChangeset
for help on using the changeset viewer.