Chromium Code Reviews| 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(); |
| } |