final RenderNode node = contentElement.getNode();
if (node instanceof RenderBox)
{
// OK, limit the size of the box to the maximum line width and
// revalidate it.
final RenderBox box = (RenderBox) node;
final long maxWidth = (getEndOfLine() - getPosition());
computeInlineBlock(box, getPosition(), maxWidth);
elementDimensions[endIndex - 1] = node.getWidth();
}
}
setSkipIndex(endIndex);
}
return(start);
}
}
// No, it is an ordinary advance ..
// Check, whether we hit an item-sequence element
if (contentElement instanceof InlineNodeSequenceElement == false)
{
for (int i = start; i < endIndex; i++)
{
final InlineSequenceElement element = sequenceElements[i];
elementPositions[i] = getPosition();
final long elementWidth = element.getMaximumWidth();
elementDimensions[i] = elementWidth;
addPosition(elementWidth);
}
return endIndex;
}
// Handle the ItemSequence element.
// This is a bit more complicated. So we encountered an inline-block
// element here. That means, the element will try to occuppy its
// maximum-content-width.
// Log.debug("Advance block at index " + contentIndex);
// final long ceWidth = contentElement.getMinimumWidth();
// final long extraSpace = contentElement.getMaximumWidth();
// Log.debug("Advance block: Min " + ceWidth);
// Log.debug("Advance block: Max " + extraSpace);
final long itemElementWidth = contentElement.getMaximumWidth();
final RenderNode node = contentElement.getNode();
if (node instanceof RenderBox)
{
final RenderBox box = (RenderBox) node;
computeInlineBlock(box, getPosition(), itemElementWidth);
}
else
{
node.setX(getPosition());