}
}
private BoxAlignContext createVerticalAlignContext(final InlineRenderBox box)
{
BoxAlignContext alignContext = new BoxAlignContext(box);
final FastStack<RenderBox> contextStack = new FastStack<RenderBox>(50);
final FastStack<AlignContext> alignContextStack = new FastStack<AlignContext>(50);
RenderNode next = box.getFirstChild();
RenderBox context = box;
while (next != null)
{
// process next
final int nodeType = next.getLayoutNodeType();
if ((nodeType & LayoutNodeTypes.MASK_BOX_INLINE) == LayoutNodeTypes.MASK_BOX_INLINE)
{
final RenderBox nBox = (RenderBox) next;
final RenderNode firstChild = nBox.getFirstChild();
if (firstChild != null)
{
// Open a non-empty box context
contextStack.push(context);
alignContextStack.push(alignContext);
next = firstChild;
final BoxAlignContext childBoxContext = new BoxAlignContext(nBox);
alignContext.addChild(childBoxContext);
context = nBox;
alignContext = childBoxContext;
}
else
{
// Process an empty box.
final BoxAlignContext childBoxContext = new BoxAlignContext(nBox);
alignContext.addChild(childBoxContext);
next = nBox.getNext();
}
}
else