public void collect( CssContext c, Shape clip, Layer layer, List blockContent, List inlineContent, BoxRangeLists rangeLists) { if (layer.isInline()) { collectInlineLayer(c, clip, layer, blockContent, inlineContent, rangeLists); } else { collect(c, clip, layer, layer.getMaster(), blockContent, inlineContent, rangeLists); } }
if (c.isPrint()) { layoutAbsoluteChildren(c); } if (! isInline()) { positionChildren(c); } } private void layoutAbsoluteChildren(LayoutContext c) {
public void collect( CssContext c, Shape clip, Layer layer, List blockContent, List inlineContent, BoxRangeLists rangeLists) { if (layer.isInline()) { collectInlineLayer(c, clip, layer, blockContent, inlineContent, rangeLists); } else { collect(c, clip, layer, layer.getMaster(), blockContent, inlineContent, rangeLists); } }
public void finish(LayoutContext c) { if (c.isPrint()) { layoutAbsoluteChildren(c); } if (! isInline()) { positionChildren(c); } }
if (getMaster().getStyle().isAbsolute() && ! c.isPrint()) { ((BlockBox)getMaster()).positionAbsolute(c, BlockBox.POSITION_BOTH); } else if (getMaster().getStyle().isRelative() && (isInline() || ((BlockBox)getMaster()).isInline())) { getMaster().positionRelative(c); if (! isInline()) { getMaster().calcCanvasLocation(); getMaster().calcChildLocations(); } } } private boolean containsFixedLayer() {
private void position(LayoutContext c) { if (getMaster().getStyle().isAbsolute() && ! c.isPrint()) { ((BlockBox)getMaster()).positionAbsolute(c, BlockBox.POSITION_BOTH); } else if (getMaster().getStyle().isRelative() && (isInline() || ((BlockBox)getMaster()).isInline())) { getMaster().positionRelative(c); if (! isInline()) { getMaster().calcCanvasLocation(); getMaster().calcChildLocations(); } } }
public void initContainingLayer(LayoutContext c) { if (getLayer() != null) { setContainingLayer(getLayer()); } else if (getContainingLayer() == null) { if (getParent() == null || getParent().getContainingLayer() == null) { throw new RuntimeException("internal error"); } setContainingLayer(getParent().getContainingLayer()); // FIXME Will be glacially slow for large inline relative layers. Could // be much more efficient. We're just looking for block boxes which are // directly wrapped by an inline relative layer (i.e. block boxes sandwiched // between anonymous block boxes) if (c.getLayer().isInline()) { List content = ((InlineLayoutBox)c.getLayer().getMaster()).getElementWithContent(); if (content.contains(this)) { setContainingLayer(c.getLayer()); } } } }
public void initContainingLayer(LayoutContext c) { if (getLayer() != null) { setContainingLayer(getLayer()); } else if (getContainingLayer() == null) { if (getParent() == null || getParent().getContainingLayer() == null) { throw new RuntimeException("internal error"); } setContainingLayer(getParent().getContainingLayer()); // FIXME Will be glacially slow for large inline relative layers. Could // be much more efficient. We're just looking for block boxes which are // directly wrapped by an inline relative layer (i.e. block boxes sandwiched // between anonymous block boxes) if (c.getLayer().isInline()) { List content = ((InlineLayoutBox)c.getLayer().getMaster()).getElementWithContent(); if (content.contains(this)) { setContainingLayer(c.getLayer()); } } } }
if (! isInline() && ((BlockBox)getMaster()).isReplaced()) { paintLayerBackgroundAndBorder(c); paintReplacedElement(c, (BlockBox)getMaster()); collector.collect(c, c.getOutputDevice().getClip(), this, blocks, lines, rangeLists); if (! isInline()) { paintLayerBackgroundAndBorder(c); if (c.debugDrawBoxes()) {
if (! isInline() && ((BlockBox)getMaster()).isReplaced()) { paintLayerBackgroundAndBorder(c); paintReplacedElement(c, (BlockBox)getMaster()); collector.collect(c, c.getOutputDevice().getClip(), this, blocks, lines, rangeLists); if (! isInline()) { paintLayerBackgroundAndBorder(c); if (c.debugDrawBoxes()) {