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

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

Issue 2587673003: Content of cell should avoid repeating headers when it straddles multiple pages (Closed)
Patch Set: bug 675453 Created 4 years 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
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..cebc52a86fccae9dd4c4eb43e92ad2723b92d41b 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()) {
+ const LayoutTableCell* cell = toLayoutTableCell(this);
+ 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

Powered by Google App Engine
This is Rietveld 408576698