block.adjustWidthForChild(childBox.getWidth());
    private static void relayoutOnNewPage(            LayoutContext c, List contentList, BlockBox block,             StyleSetListener styleSetListener, RelayoutDataList relayoutDataList,             int start, int end) {        block.height = relayoutDataList.get(start).getInitialParentHeight();        block.expandToPageBottom(c);                for (int i = start; i <= end; i++) {            Content currentContent = (Content)contentList.get(i);                        RelayoutData relayoutData = relayoutDataList.get(i);            BlockBox childBox = null;            //TODO:handle run-ins. For now, treat them as blocks                        c.restoreStateForRelayout(relayoutData.getLayoutState());            childBox = layoutBlockChild(                    c, block, styleSetListener, relayoutData.getListIndex(),                   relayoutData.isResetMargins(), false, currentContent);                        if (childBox.getStyle().isAvoidPageBreakInside() &&                    childBox.crossesPageBreak(c)) {                if (currentContent instanceof AnonymousBlockContent                         && relayoutData.isHasPendingInlines()) {                    XRLog.layout(Level.WARNING,                             "Unable to relayout anonymous block with pending inlines. Dropping rule.");                } else {                    c.restoreStateForRelayout(relayoutData.getLayoutState());                    childBox.detach();                    childBox = layoutBlockChild(                            c, block, styleSetListener, relayoutData.getListIndex(),                             relayoutData.isResetMargins(), true, currentContent);                }            }                        c.getRootLayer().ensureHasPage(c, childBox);                        block.adjustWidthForChild(childBox.getWidth());            block.height = childBox.y + childBox.height;                        if (childBox.getStyle().isForcePageBreakAfter()) {                block.expandToPageBottom(c);            }        }    }