// set the page-height as watermark size.
return lpb.getPageHeight();
}
// Check the height. Set the height.
final BoxDefinition boxDefinition = box.getBoxDefinition();
final RenderLength preferredHeight = boxDefinition.getPreferredHeight();
final RenderLength minimumHeight = boxDefinition.getMinimumHeight();
final RenderLength maximumHeight = boxDefinition.getMaximumHeight();
final StaticBoxLayoutProperties blp = box.getStaticBoxLayoutProperties();
final long insetBottom = blp.getBorderBottom() + boxDefinition.getPaddingBottom();
final long insetTop = blp.getBorderTop() + boxDefinition.getPaddingTop();
// usedHeight already contains the insetsTop ..
final long usedHeight;
RenderNode child = box.getFirstChild();
if (child != null)
{
long maxChildY2 = 0;
while (child != null)
{
if (child.isVisible())
{
final long childY2 = child.getCachedY() + child.getCachedHeight() + child.getEffectiveMarginBottom();
maxChildY2 = Math.max(childY2, maxChildY2);
}
child = child.getNext();
}
usedHeight = (maxChildY2 - box.getCachedY());
}
else
{
usedHeight = insetTop;
}
final long rminH = minimumHeight.resolve(resolveSize, 0);
final long rmaxH = maximumHeight.resolve(resolveSize, InfiniteMajorAxisLayoutStep.MAX_AUTO);
final long computedHeight; // always the height of the content box
if (boxDefinition.isSizeSpecifiesBorderBox())
{
final long rprefH = preferredHeight.resolve(resolveSize, usedHeight + insetBottom);
final long specifiedHeight = ProcessUtility.computeLength(rminH, rmaxH, rprefH);
computedHeight = Math.max(0, specifiedHeight - insetTop - insetBottom);
}