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

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

Issue 2882043002: Update our treatment of repeating headers in tables (Closed)
Patch Set: bug 720620 Created 3 years, 7 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 a7da0f04a8fe7ce16767db5c30c3b6f38f9eb0f0..db24f8a5282364109bfcd837aade8f692d6f82b3 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -5803,13 +5803,14 @@ LayoutUnit LayoutBox::CalculatePaginationStrutToFitContent(
LayoutUnit content_logical_height) const {
DCHECK_EQ(strut_to_next_page, PageRemainingLogicalHeightForOffset(
offset, kAssociateWithLatterPage));
- // 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())
- strut_to_next_page += cell->Table()->RowOffsetFromRepeatingHeader();
+ // 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();
}
+
LayoutUnit next_page_logical_top = offset + strut_to_next_page;
if (PageLogicalHeightForOffset(next_page_logical_top) >=
content_logical_height)
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698