previousIB = currentIB;
currentIB = currentIB.getParent() instanceof LineBox ?
null : (InlineLayoutBox) currentIB.getParent();
}
} else {
BlockBox child = (BlockBox)node;
if (child.getStyle().isNonFlowContent()) {
remainingWidth -= processOutOfFlowContent(
c, currentLine, child, remainingWidth, pendingFloats);
} else if (child.getStyle().isInlineBlock() || child.getStyle().isInlineTable()) {
layoutInlineBlockContent(c, box, child, initialY);
if (child.getWidth() > remainingWidth && currentLine.isContainsContent()) {
saveLine(currentLine, c, box, minimumLineHeight,
maxAvailableWidth, pendingFloats, hasFirstLinePEs,
pendingInlineLayers, markerData, contentStart,
isAlwaysBreak(c, box, breakAtLine, lineOffset));
lineOffset++;
markerData = null;
contentStart = 0;
previousLine = currentLine;
currentLine = newLine(c, previousLine, box);
currentIB = addOpenInlineBoxes(
c, currentLine, openInlineBoxes, maxAvailableWidth, iBMap);
previousIB = currentIB == null || currentIB.getParent() instanceof LineBox ?
null : (InlineLayoutBox) currentIB.getParent();
remainingWidth = maxAvailableWidth;
remainingWidth -= c.getBlockFormattingContext().getFloatDistance(c, currentLine, remainingWidth);
child.reset(c);
layoutInlineBlockContent(c, box, child, initialY);
}
if (currentIB == null) {
currentLine.addChildForLayout(c, child);
} else {
currentIB.addInlineChild(c, child);
}
currentLine.setContainsContent(true);
currentLine.setContainsBlockLevelContent(true);
remainingWidth -= child.getWidth();
if (currentIB != null && currentIB.isStartsHere()) {
pendingLeftMBP -= currentIB.getStyle().getMarginBorderPadding(
c, maxAvailableWidth, CalculatedStyle.LEFT);
}
needFirstLetter = false;
if (child.getWidth() == 0) {
zeroWidthInlineBlock = true;
}
}
}
}