Chromium Code Reviews| 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 36cdfe6537f2b5c110527b888b857cebd0ddd057..407a001701ce414d1bccd955e15ea18160f07601 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
| @@ -1130,7 +1130,8 @@ void LayoutBlockFlow::AdjustLinePositionForPagination(RootInlineBox& line_box, |
| logical_offset += delta; |
| line_box.SetPaginationStrut(LayoutUnit()); |
| line_box.SetIsFirstAfterPageBreak(false); |
| - if (!View()->GetLayoutState()->IsPaginated()) |
| + LayoutState* layout_state = View()->GetLayoutState(); |
| + if (!layout_state->IsPaginated()) |
| return; |
| LayoutUnit page_logical_height = PageLogicalHeightForOffset(logical_offset); |
| if (!page_logical_height) |
| @@ -1168,6 +1169,8 @@ void LayoutBlockFlow::AdjustLinePositionForPagination(RootInlineBox& line_box, |
| } |
| if (ShouldSetStrutOnBlock(*this, line_box, logical_offset, line_index, |
| page_logical_height)) { |
| + DCHECK(!IsTableCell()); |
| + pagination_strut += layout_state->HeightOffsetForTableHeaders(); |
|
mstensho (USE GERRIT)
2017/05/29 10:22:00
I was actually expecting this one to go away, now
|
| // Note that when setting the strut on a block, it may be propagated to |
| // parent blocks later on, if a block's logical top is flush with that of |
| // its parent. We don't want content-less portions (struts) at the |
| @@ -1194,8 +1197,11 @@ void LayoutBlockFlow::AdjustLinePositionForPagination(RootInlineBox& line_box, |
| // up in the next column or page. Setting a strut on the block is also |
| // important when it comes to satisfying orphan requirements. |
| if (ShouldSetStrutOnBlock(*this, line_box, logical_offset, line_index, |
| - page_logical_height)) |
| - strut_to_propagate = logical_offset; |
| + page_logical_height)) { |
| + DCHECK(!IsTableCell()); |
| + strut_to_propagate = |
| + logical_offset + layout_state->HeightOffsetForTableHeaders(); |
|
mstensho (USE GERRIT)
2017/05/29 10:22:00
This one we need to keep, though, since CalculateP
|
| + } |
| } else if (line_box == FirstRootBox() && AllowsPaginationStrut()) { |
| // This is the first line in the block. The block may still start in the |
| // previous column or page, and if that's the case, attempt to pull it over |