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 1cf0809acef7d33475d3b90043cbfd84e88eb4d5..8b8679a62939303aea1de82111e0778a249c2eca 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBox.h |
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.h |
@@ -587,6 +587,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 |
+ // 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. |
+ virtual LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUnit strutToNextPage, LayoutUnit contentLogicalHeight) const; |
+ |
void positionLineBox(InlineBox*); |
void moveWithEdgeOfInlineContainerIfNecessary(bool isHorizontal); |