if (isHidden(style)) {
if (isHidden(currentStyle)) {
    static List getChildContentList(Context c, Content parent) {        List inlineList = new LinkedList();        FirstLineStyle firstLineStyle = null;        FirstLetterStyle firstLetterStyle = null;        StringBuffer textContent = null;        CascadedStyle parentStyle = parent.getStyle();        Element parentElement = parent.getElement();        if (parentElement != null) {            if (mayHaveFirstLine(parentStyle)) {                //put in a marker if there is first-line styling                CascadedStyle firstLine = c.getCss().getPseudoElementStyle(parentElement, "first-line");                if (firstLine != null) {                    firstLineStyle = new FirstLineStyle(firstLine);                }            }            if (mayHaveFirstLetter(parentStyle)) {                //put in a marker if there is first-letter styling                CascadedStyle firstLetter = c.getCss().getPseudoElementStyle(parentElement, "first-letter");                if (firstLetter != null) {                    firstLetterStyle = new FirstLetterStyle(firstLetter);                }            }            //TODO: before and after may be block!            //<br/> handling should be done by :before content            CascadedStyle before = c.getCss().getPseudoElementStyle(parentElement, "before");            if (before != null && before.hasProperty(CSSName.CONTENT)) {                String content = ((CSSPrimitiveValue) before.propertyByName(CSSName.CONTENT).getValue()).getStringValue();                if (!content.equals("")) {                    inlineList.add(new StylePush("before", parentElement));                    c.pushStyle(before);                    textContent = new StringBuffer();                    textContent.append(content.replaceAll("\\\\A", "\n"));                    inlineList.add(new TextContent("before", parentElement, textContent.toString()));                    textContent = null;                    c.popStyle();                    inlineList.add(new StylePop("before", parentElement));                }                //do not reset style here, because if this element is empty, we will not have changed context            }        }        Iterator i = getNodeIterator(parent);        TableContent anonymousTable = null;        //each child node can result in only one addition to content        while (i.hasNext()) {            Node curr = (Node) i.next();            if (curr.getNodeType() != Node.ELEMENT_NODE && curr.getNodeType() != Node.TEXT_NODE) {                continue;            }//must be a comment or pi or something            if (curr.getNodeType() == Node.TEXT_NODE) {                String text = curr.getNodeValue();                if (textContent == null) {                    textContent = new StringBuffer();                }                textContent.append(text);                //if we reach here, our anonymous table is done                anonymousTable = null;                continue;            }            Element elem = (Element) curr;            CascadedStyle style = c.getCss().getCascadedStyle(elem, true);//this is the place where restyle is done for layout (boxing)            c.pushStyle(style);//just remember to pop it before continue            if (isTableDescendant(style)) {                if (anonymousTable == null) {                    anonymousTable = new TableContent();                    inlineList.add(anonymousTable);                }                anonymousTable.addChild(elem);                c.popStyle();                continue;            }            //if we reach here, our anonymous table is done            anonymousTable = null;            if (isHidden(style)) {                c.popStyle();                continue;//at least for now, don't generate hidden content            }            if (isAbsoluteOrFixed(style)) {                // Uu.p("adding replaced: " + curr);                textContent = saveTextContent(textContent, inlineList, parentElement, parent);                inlineList.add(new AbsolutelyPositionedContent((Element) curr, style));                c.popStyle();                continue;            }            //have to check for float here already. The element may still be replaced, though            if (isFloated(style)) {                // Uu.p("adding floated block: " + curr);                textContent = saveTextContent(textContent, inlineList, parentElement, parent);                inlineList.add(new FloatedBlockContent((Element) curr, style));                c.popStyle();                continue;            }            if (isInlineBlock(style)) {                //treat it like a replaced element                textContent = saveTextContent(textContent, inlineList, parentElement, parent);                inlineList.add(new InlineBlockContent(elem, style));                c.popStyle();                continue;            }            if (isRunIn(style)) {                RunInContent runIn = new RunInContent(elem, style);                textContent = saveTextContent(textContent, inlineList, parentElement, parent);                inlineList.add(runIn);//resolve it when we can                c.popStyle();                continue;            }            if (isTable(style)) {                textContent = saveTextContent(textContent, inlineList, parentElement, parent);                TableContent table = new TableContent(elem, style);                inlineList.add(table);                c.popStyle();                continue;            }            //TODO:list-items, anonymous tables, inline tables, etc.            if (isBlockLevel(style)) {                textContent = saveTextContent(textContent, inlineList, parentElement, parent);                BlockContent block = new BlockContent(elem, style);                inlineList.add(block);                c.popStyle();                continue;            }            //if we get here, we have inline element content, need to get into it.            textContent = saveTextContent(textContent, inlineList, parentElement, parent);            Content inline = new InlineContent(elem, style);            List childList = inline.getChildContent(c);            inlineList.add(new StylePush(null, elem));//this is already pushed to context            //the child list represents the entire contents of an element,            //therefore we need not concern ourselves with style-changes, as they will even out            for (Iterator ci = childList.iterator(); ci.hasNext();) {                Object o = ci.next();                if (o instanceof AnonymousBlockContent) {                    inlineList.addAll(((AnonymousBlockContent) o).getChildContent(c));                } else {                    inlineList.add(o);                }            }            inlineList.add(new StylePop(null, elem));//pop from c below            c.popStyle();        }        textContent = saveTextContent(textContent, inlineList, parentElement, parent);        if (parentElement != null) {            //TODO: after may be block!            CascadedStyle after = c.getCss().getPseudoElementStyle(parentElement, "after");            if (after != null && after.hasProperty(CSSName.CONTENT)) {                String content = ((CSSPrimitiveValue) after.propertyByName(CSSName.CONTENT).getValue()).getStringValue();                if (!content.equals("")) {//a worthwhile reduncancy-check                    textContent = saveTextContent(textContent, inlineList, parentElement, parent);                    inlineList.add(new StylePush("after", parentElement));                    textContent = new StringBuffer();                    textContent.append(content.replaceAll("\\\\A", "\n"));                    inlineList.add(new TextContent(parentElement, textContent.toString()));                    textContent = null;                    inlineList.add(new StylePop("after", parentElement));                }            }        }        List blockList = null;        if (firstLetterStyle != null) {            inlineList.add(0, firstLetterStyle);        }        if (firstLineStyle != null) {            inlineList.add(0, firstLineStyle);        }        if (hasBlockContent(inlineList)) {            blockList = new LinkedList();            blockList.addAll(resolveBlockContent(inlineList, parentElement, c));            return blockList;        } else {            inlineList = WhitespaceStripper.stripInlineContent(c, inlineList);            return inlineList;        }    }