Index: third_party/WebKit/Source/core/layout/LayoutTable.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp |
index 38961ef6b09c737491c0767b5d21aab5a27c0e4a..b890f002648075ffad205773aa75642df8de8f0f 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp |
@@ -543,9 +543,13 @@ void LayoutTable::layout() |
section->setLogicalTop(logicalOffset); |
section->layoutRows(); |
logicalOffset += section->logicalHeight(); |
- if (isPaginated && m_head && m_head == section && section->logicalHeight() < section->pageLogicalHeightForOffset(logicalOffset)) { |
+ // If the section is a repeating header group that allows at least one row of content then store the |
+ // offset for other sections to offset their rows against. |
+ if (isPaginated && m_head && m_head == section && section->logicalHeight() < section->pageLogicalHeightForOffset(logicalOffset) |
+ && section->getPaginationBreakability() != LayoutBox::AllowAnyBreaks) { |
LayoutUnit offsetForTableHeaders = state.heightOffsetForTableHeaders(); |
- offsetForTableHeaders += section->logicalHeight(); |
+ // Don't include any strut in the header group - we only want the height from its content. |
+ offsetForTableHeaders += section->logicalHeight() - section->paginationStrutForRow(section->firstRow(), section->logicalTop()); |
mstensho (USE GERRIT)
2016/08/10 09:42:48
section->firstRow() may be nullptr.
|
state.setHeightOffsetForTableHeaders(offsetForTableHeaders); |
} |
} |