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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp

Issue 2433413002: Remove last-minute row height stretching for pagination. (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
index 7586ee7266b54949e7ef25b59c22ed8cee6c79cc..b198a6255645b7989cf104da06514c04af9f7723 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
@@ -1143,7 +1143,6 @@ void LayoutTableSection::layoutRows() {
// Vertically align and flex the cells in each row.
for (unsigned r = 0; r < totalRows; r++) {
LayoutTableRow* rowLayoutObject = m_grid[r].rowLayoutObject;
- int rowHeightIncreaseForPagination = INT_MIN;
for (unsigned c = 0; c < nEffCols; c++) {
CellStruct& cs = cellAt(r, c);
@@ -1194,23 +1193,6 @@ void LayoutTableSection::layoutRows() {
cell->layoutIfNeeded();
- // FIXME: Make pagination work with vertical tables.
- if (view()->layoutState()->pageLogicalHeight() &&
- cell->logicalHeight() != rHeight) {
- // FIXME: Pagination might have made us change size. For now just shrink
- // or grow the cell to fit without doing a relayout.
- // 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 either. It's at least
- // stable though and won't result in an infinite # of relayouts that may
- // never stabilize.
- LayoutUnit oldLogicalHeight = cell->logicalHeight();
- rowHeightIncreaseForPagination =
- std::max<int>(rowHeightIncreaseForPagination,
- (oldLogicalHeight - rHeight).toInt());
- cell->setLogicalHeight(LayoutUnit(rHeight));
- cell->computeOverflow(oldLogicalHeight, false);
- }
-
LayoutSize childOffset(cell->location() - oldCellRect.location());
if (childOffset.width() || childOffset.height()) {
// If the child moved, we have to issue paint invalidations to it as
@@ -1221,19 +1203,6 @@ void LayoutTableSection::layoutRows() {
cell->setMayNeedPaintInvalidation();
}
}
- if (rowHeightIncreaseForPagination > INT_MIN) {
- for (unsigned rowIndex = r + 1; rowIndex <= totalRows; rowIndex++)
- m_rowPos[rowIndex] += rowHeightIncreaseForPagination;
- for (unsigned c = 0; c < nEffCols; ++c) {
- Vector<LayoutTableCell*, 1>& cells = cellAt(r, c).cells;
- for (size_t i = 0; i < cells.size(); ++i) {
- LayoutUnit oldLogicalHeight = cells[i]->logicalHeight();
- cells[i]->setLogicalHeight(oldLogicalHeight +
- rowHeightIncreaseForPagination);
- cells[i]->computeOverflow(oldLogicalHeight, false);
- }
- }
- }
if (rowLayoutObject)
rowLayoutObject->computeOverflow();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698