Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| index d9673fa25ee06b0138ebd53efbb1bc8e85a0e74b..f12eb616cb7c3f72111d192fb662d83af1a167ae 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| @@ -5587,6 +5587,13 @@ LayoutUnit LayoutBox::calculatePaginationStrutToFitContent( |
| LayoutUnit contentLogicalHeight) const { |
| ASSERT(strutToNextPage == |
| pageRemainingLogicalHeightForOffset(offset, AssociateWithLatterPage)); |
| + // If we're a cell in a row that straddles a page then avoid the repeating |
| + // header group if necessary. |
| + if (isTableCell()) { |
| + LayoutTableCell* cell = toLayoutTableCell(const_cast<LayoutBox*>(this)); |
|
mstensho (USE GERRIT)
2016/12/20 11:47:00
Why not keep the constness?
|
| + if (!cell->row()->isFirstRowInSectionAfterHeader()) |
| + strutToNextPage += cell->table()->rowOffsetFromRepeatingHeader(); |
| + } |
| LayoutUnit nextPageLogicalTop = offset + strutToNextPage; |
| if (pageLogicalHeightForOffset(nextPageLogicalTop) >= contentLogicalHeight) |
| return strutToNextPage; // Content fits just fine in the next page or |