private static ChildBoxInfo lookForBlockContent(List styleables) { ChildBoxInfo result = new ChildBoxInfo(); for (Iterator i = styleables.iterator(); i.hasNext();) { Styleable s = (Styleable) i.next(); if (!s.getStyle().isLayedOutInInlineContext()) { result.setContainsBlockLevelContent(true); break; } } return result; }
if (!info.isContainsBlockLevelContent() && !style.isLayedOutInInlineContext()) { info.setContainsBlockLevelContent(true);
ChildBoxInfo info = new ChildBoxInfo(); CalculatedStyle pageStyle = new EmptyStyle().deriveStyle(pageInfo.getPageStyle());
ChildBoxInfo info = new ChildBoxInfo(); CalculatedStyle pageStyle = new EmptyStyle().deriveStyle(pageInfo.getPageStyle());
if (!info.isContainsBlockLevelContent() && !style.isLayedOutInInlineContext()) { info.setContainsBlockLevelContent(true);
if (target != null) { result.add(target.copyOf()); info.setContainsBlockLevelContent(true);
if (target != null) { result.add(target.copyOf()); info.setContainsBlockLevelContent(true);
ChildBoxInfo info = new ChildBoxInfo(); info.setContainsTableContent(true); info.setLayoutRunningBlocks(true);
ChildBoxInfo info = new ChildBoxInfo(); info.setContainsTableContent(true); info.setLayoutRunningBlocks(true);
info.setContainsBlockLevelContent(true);
info.setContainsBlockLevelContent(true); resolveChildren(c, parent, childrenWithAnonymous, info);
info.setContainsBlockLevelContent(true); resolveChildren(c, parent, childrenWithAnonymous, info); } else {
info.setContainsBlockLevelContent(true); resolveChildren(c, parent, childrenWithAnonymous, info);
info.setContainsBlockLevelContent(true); resolveChildren(c, parent, childrenWithAnonymous, info); } else {
return new TableBox(); } else if (style.isTableCell()) { info.setContainsTableContent(true); return new TableCellBox(); } else if (! generated && style.isTableRow()) { info.setContainsTableContent(true); return new TableRowBox(); } else if (! generated && style.isTableSection()) { info.setContainsTableContent(true); return new TableSectionBox(); } else if (style.isTableCaption()) { info.setContainsTableContent(true); return new BlockBox(); } else {
return new TableBox(); } else if (style.isTableCell()) { info.setContainsTableContent(true); return new TableCellBox(); } else if (! generated && style.isTableRow()) { info.setContainsTableContent(true); return new TableRowBox(); } else if (! generated && style.isTableSection()) { info.setContainsTableContent(true); return new TableSectionBox(); } else if (style.isTableCaption()) { info.setContainsTableContent(true); return new BlockBox(); } else {
private static void resolveChildren( LayoutContext c, BlockBox owner, List children, ChildBoxInfo info) { if (children.size() > 0) { if (info.isContainsBlockLevelContent()) { insertAnonymousBlocks( c.getSharedContext(), owner, children, info.isLayoutRunningBlocks()); owner.setChildrenContentType(BlockBox.CONTENT_BLOCK); } else { WhitespaceStripper.stripInlineContent(children); if (children.size() > 0) { owner.setInlineContent(children); owner.setChildrenContentType(BlockBox.CONTENT_INLINE); } else { owner.setChildrenContentType(BlockBox.CONTENT_EMPTY); } } } else { owner.setChildrenContentType(BlockBox.CONTENT_EMPTY); } }
public static void createChildren(LayoutContext c, BlockBox parent) { List children = new ArrayList(); ChildBoxInfo info = new ChildBoxInfo(); createChildren(c, parent, parent.getElement(), children, info, false); boolean parentIsNestingTableContent = isNestingTableContent(parent.getStyle().getIdent( CSSName.DISPLAY)); if (!parentIsNestingTableContent && !info.isContainsTableContent()) { resolveChildren(c, parent, children, info); } else { stripAllWhitespace(children); if (parentIsNestingTableContent) { resolveTableContent(c, parent, children, info); } else { resolveChildTableContent(c, parent, children, info, IdentValue.TABLE_CELL); } } }
public static void createChildren(LayoutContext c, BlockBox parent) { List children = new ArrayList(); ChildBoxInfo info = new ChildBoxInfo(); createChildren(c, parent, parent.getElement(), children, info, false); boolean parentIsNestingTableContent = isNestingTableContent(parent.getStyle().getIdent( CSSName.DISPLAY)); if (!parentIsNestingTableContent && !info.isContainsTableContent()) { resolveChildren(c, parent, children, info); } else { stripAllWhitespace(children); if (parentIsNestingTableContent) { resolveTableContent(c, parent, children, info); } else { resolveChildTableContent(c, parent, children, info, IdentValue.TABLE_CELL); } } }