Dimension max_size = new Dimension(c.getMaxWidth(), c.getMaxHeight());
    public static void layoutContent(final LayoutContext c, final Box box,             List contentList, Box block) {        // prepare for the list items        int old_counter = c.getListCounter();        c.setListCounter(0);        Iterator contentIterator = contentList.iterator();                Boxing.StyleSetListener styleSetListener = new Boxing.StyleSetListener() {            public void onStyleSet(Box child) {                if (child.getStyle().isCleared()) {                    c.translate(0, -box.height);                    c.getBlockFormattingContext().clear(c, child);                    c.translate(0, child.y);                }            }        };                while (contentIterator.hasNext()) {            Object o = contentIterator.next();                        if (o instanceof FirstLineStyle || o instanceof FirstLetterStyle) {                continue;            }            Content currentContent = (Content) o;            BlockBox child_box = null;            //TODO:handle run-ins. For now, treat them as blocks            child_box = Boxing.preLayout(c, currentContent);                        // update the counter for printing OL list items            //TODO:handle counters correctly            if (! (child_box instanceof AnonymousBlockBox)) {                c.setListCounter(c.getListCounter() + 1);            }                        child_box.setListCounter(c.getListCounter());            child_box.x = 0;            int initialY = box.height;                        child_box.y = initialY;                       //Uu.p("set child box y to: " + child_box);            box.addChild(c, child_box);                        c.translate(0, box.height);            Boxing.realLayout(c, child_box, currentContent, styleSetListener);            c.translate(0, -child_box.y);            // increase the final layout width if the child was greater            box.adjustWidthForChild(child_box.getWidth());            c.addMaxWidth(box.getWidth());            // increase the final layout height by the height of the child            box.height += (child_box.y - initialY) + child_box.height;            c.addMaxHeight(box.height + box.y + (int) c.getOriginOffset().getY());            if (c.shouldStop()) {                break;            }            //Uu.p("alerting that there is a box available");            Dimension max_size = new Dimension(c.getMaxWidth(), c.getMaxHeight());            if (c.isInteractive() && !c.isPrint()) {                if (Configuration.isTrue("xr.incremental.enabled", false) && c.isRenderQueueAvailable()) {                    c.getRenderQueue().dispatchRepaintEvent(new ReflowEvent(ReflowEvent.MORE_BOXES_AVAILABLE, box, max_size));                }                int delay = Configuration.valueAsInt("xr.incremental.debug.layoutdelay", 0);                if (delay > 0) {                    //Uu.p("sleeping for: " + delay);                    try {                        Uu.sleep(delay);                    } catch (Exception ex) {                        Uu.p("sleep was interrupted in BlockBoxing.layoutContent()!");                    }                }            }        }        c.addMaxWidth(box.getWidth());        c.setListCounter(old_counter);    }