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

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

Issue 2584143003: Repeat footers in paginated context (Closed)
Patch Set: bug 656232 Created 3 years, 5 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
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 5f7b6479ef33e3a0769ab0be720dead38a7d2dbd..9fbf9bd4d9d689a927b7b41b97be75dd1963602f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -5850,7 +5850,8 @@ LayoutUnit LayoutBox::PageRemainingLogicalHeightForOffset(
}
return flow_thread->PageRemainingLogicalHeightForOffset(offset,
- page_boundary_rule);
+ page_boundary_rule) -
+ View()->GetLayoutState()->HeightOffsetForTableFooters();
mstensho (USE GERRIT) 2017/08/01 18:58:18 Should we DCHECK that the result isn't negative?
}
bool LayoutBox::CrossesPageBoundary(LayoutUnit offset,
@@ -5867,11 +5868,12 @@ LayoutUnit LayoutBox::CalculatePaginationStrutToFitContent(
LayoutUnit strut_to_next_page =
PageRemainingLogicalHeightForOffset(offset, kAssociateWithLatterPage);
+ LayoutState* layout_state = View()->GetLayoutState();
+ strut_to_next_page += layout_state->HeightOffsetForTableFooters();
// If we're inside a cell in a row that straddles a page then avoid the
// repeating header group if necessary. If we're a table section we're
// already accounting for it.
if (!IsTableSection()) {
- LayoutState* layout_state = View()->GetLayoutState();
strut_to_next_page += layout_state->HeightOffsetForTableHeaders();
}

Powered by Google App Engine
This is Rietveld 408576698