Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
index cd339bcc64501e40bcff038c649d17c0bc1a4801..058560c02a9b5716601d2b788f956419907d0c8a 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
@@ -1139,7 +1139,11 @@ void LayoutBlockFlow::AdjustLinePositionForPagination(RootInlineBox& line_box, |
LayoutUnit remaining_logical_height = PageRemainingLogicalHeightForOffset( |
logical_offset, kAssociateWithLatterPage); |
int line_index = LineCount(&line_box); |
- if (remaining_logical_height < line_height || |
+ // We need to detect if we overlap a repeating footer and if so take the |
+ // full remaining logical height as our strut to the next page. |
mstensho (USE GERRIT)
2017/06/20 21:39:05
But why wouldn't you want to do the same for other
|
+ LayoutUnit remaining_logical_height_including_footer = |
+ remaining_logical_height - layout_state->HeightOffsetForTableFooters(); |
+ if (remaining_logical_height_including_footer < line_height || |
(ShouldBreakAtLineToAvoidWidow() && |
LineBreakToAvoidWidow() == line_index)) { |
LayoutUnit pagination_strut = CalculatePaginationStrutToFitContent( |