| 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 901dfb458dbcee07d724b2053983d012986aeb79..ea121d6facc4ef027fb629d24ea66f56ba726e3f 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
|
| @@ -972,10 +972,9 @@ void LayoutTableSection::layoutRows()
|
| rowLayoutObject->updateLayerTransformAfterLayout();
|
| rowLayoutObject->clearAllOverflows();
|
| rowLayoutObject->addVisualEffectOverflow();
|
| + rowLayoutObject->resetPaginationStrutPropagatedFromCell();
|
| }
|
|
|
| - int rowHeightIncreaseForPagination = 0;
|
| -
|
| for (unsigned c = 0; c < nEffCols; c++) {
|
| CellStruct& cs = cellAt(r, c);
|
| LayoutTableCell* cell = cs.primaryCell();
|
| @@ -1050,18 +1049,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();
|
| - if (oldLogicalHeight > rHeight)
|
| - rowHeightIncreaseForPagination = std::max<int>(rowHeightIncreaseForPagination, oldLogicalHeight - rHeight);
|
| - cell->setLogicalHeight(LayoutUnit(rHeight));
|
| - cell->computeOverflow(oldLogicalHeight, false);
|
| - }
|
| -
|
| if (rowLayoutObject)
|
| rowLayoutObject->addOverflowFromCell(cell);
|
|
|
| @@ -1074,15 +1061,16 @@ void LayoutTableSection::layoutRows()
|
| cell->setMayNeedPaintInvalidation();
|
| }
|
| }
|
| - if (rowHeightIncreaseForPagination) {
|
| - 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->paginationStrutPropagatedFromCell()) {
|
| + for (unsigned rowIndex = r; rowIndex <= totalRows; rowIndex++) {
|
| + m_rowPos[rowIndex] += rowLayoutObject->paginationStrutPropagatedFromCell();
|
| + if (rowIndex == totalRows)
|
| + continue;
|
| + for (unsigned c = 0; c < nEffCols; ++c) {
|
| + Vector<LayoutTableCell*, 1>& cells = cellAt(rowIndex, c).cells;
|
| + for (size_t i = 0; i < cells.size(); ++i) {
|
| + setLogicalPositionForCell(cells[i], c);
|
| + }
|
| }
|
| }
|
| }
|
|
|