Index: Source/core/rendering/RenderBlockFlow.cpp |
diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp |
index 84aff4e1773ccbdeee660f2284e8a6a517dd8001..3e64c68b404aa2bc1815235bb0a4bc2309f6ee53 100644 |
--- a/Source/core/rendering/RenderBlockFlow.cpp |
+++ b/Source/core/rendering/RenderBlockFlow.cpp |
@@ -867,6 +867,25 @@ void RenderBlockFlow::adjustLinePositionForPagination(RootInlineBox* lineBox, La |
} |
} |
+LayoutUnit RenderBlockFlow::adjustForUnsplittableChild(RenderBox* child, LayoutUnit logicalOffset, bool includeMargins) |
+{ |
+ bool checkColumnBreaks = view()->layoutState()->isPaginatingColumns() || flowThreadContainingBlock(); |
+ bool checkPageBreaks = !checkColumnBreaks && view()->layoutState()->pageLogicalHeight(); |
+ bool isUnsplittable = child->isUnsplittableForPagination() || (checkColumnBreaks && child->style()->columnBreakInside() == PBAVOID) |
+ || (checkPageBreaks && child->style()->pageBreakInside() == PBAVOID); |
+ if (!isUnsplittable) |
+ return logicalOffset; |
+ LayoutUnit childLogicalHeight = logicalHeightForChild(child) + (includeMargins ? marginBeforeForChild(child) + marginAfterForChild(child) : LayoutUnit()); |
+ LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset); |
+ updateMinimumPageHeight(logicalOffset, childLogicalHeight); |
+ if (!pageLogicalHeight || childLogicalHeight > pageLogicalHeight) |
+ return logicalOffset; |
+ LayoutUnit remainingLogicalHeight = pageRemainingLogicalHeightForOffset(logicalOffset, ExcludePageBoundary); |
+ if (remainingLogicalHeight < childLogicalHeight) |
+ return logicalOffset + remainingLogicalHeight; |
+ return logicalOffset; |
+} |
+ |
void RenderBlockFlow::rebuildFloatsFromIntruding() |
{ |
if (m_floatingObjects) |