Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBox.h |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h |
| index c2d018da23a33ee711fe1721bb230c8ecd6fa383..f7a02fddce9d5247f334e5c4effbf6c6967ae502 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.h |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.h |
| @@ -586,6 +586,18 @@ public: |
| LayoutUnit pageLogicalOffset() const { return m_rareData ? m_rareData->m_pageLogicalOffset : LayoutUnit(); } |
| void setPageLogicalOffset(LayoutUnit); |
| + // Specify which page or column to associate with an offset, if said offset is exactly at a page |
|
mstensho (USE GERRIT)
2016/03/17 14:04:03
YES! This belongs in LayoutBox, and finally we hav
|
| + // or column boundary. |
| + enum PageBoundaryRule { AssociateWithFormerPage, AssociateWithLatterPage }; |
| + LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const; |
| + LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule) const; |
| + |
| + // Calculate the strut to insert in order fit content of size |contentLogicalHeight|. |
| + // |strutToNextPage| is the strut to add to |offset| to merely get to the top of the next page |
| + // or column. This is what will be returned if the content can actually fit there. Otherwise, |
| + // return the distance to the next fragmentainer that can fit this piece of content. |
| + LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUnit strutToNextPage, LayoutUnit contentLogicalHeight) const; |
| + |
| void positionLineBox(InlineBox*); |
| void moveWithEdgeOfInlineContainerIfNecessary(bool isHorizontal); |