+2014-10-30 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Use references in calculateMinimumPageHeight() for non-optional arguments
+ https://bugs.webkit.org/show_bug.cgi?id=138231
+
+ Reviewed by Dean Jackson.
+
+ No new tests because there is no behavior change.
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::calculateMinimumPageHeight):
+ (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
+
2014-10-30 Chris Dumez <cdumez@apple.com>
Move -webkit-border-image / -webkit-mask-box-image to the new StyleBuilder
return result;
}
-static inline LayoutUnit calculateMinimumPageHeight(RenderStyle* renderStyle, RootInlineBox* lastLine, LayoutUnit lineTop, LayoutUnit lineBottom)
+static inline LayoutUnit calculateMinimumPageHeight(RenderStyle& renderStyle, RootInlineBox& lastLine, LayoutUnit lineTop, LayoutUnit lineBottom)
{
// We may require a certain minimum number of lines per page in order to satisfy
// orphans and widows, and that may affect the minimum page height.
- unsigned lineCount = std::max<unsigned>(renderStyle->hasAutoOrphans() ? 1 : renderStyle->orphans(), renderStyle->hasAutoWidows() ? 1 : renderStyle->widows());
+ unsigned lineCount = std::max<unsigned>(renderStyle.hasAutoOrphans() ? 1 : renderStyle.orphans(), renderStyle.hasAutoWidows() ? 1 : renderStyle.widows());
if (lineCount > 1) {
- RootInlineBox* line = lastLine;
+ RootInlineBox* line = &lastLine;
for (unsigned i = 1; i < lineCount && line->prevRootBox(); i++)
line = line->prevRootBox();
LayoutUnit logicalOffset = std::min(lineBox->lineTopWithLeading(), logicalVisualOverflow.y());
LayoutUnit logicalBottom = std::max(lineBox->lineBottomWithLeading(), logicalVisualOverflow.maxY());
LayoutUnit lineHeight = logicalBottom - logicalOffset;
- updateMinimumPageHeight(logicalOffset, calculateMinimumPageHeight(&style(), lineBox, logicalOffset, logicalBottom));
+ updateMinimumPageHeight(logicalOffset, calculateMinimumPageHeight(style(), *lineBox, logicalOffset, logicalBottom));
logicalOffset += delta;
lineBox->setPaginationStrut(0);
lineBox->setIsFirstAfterPageBreak(false);