private static int processOutOfFlowContent( LayoutContext c, LineBox current, BlockBox block, int available, List pendingFloats) { int result = 0; CalculatedStyle style = block.getStyle(); if (style.isAbsolute() || style.isFixed()) { LayoutUtil.layoutAbsolute(c, current, block); current.addNonFlowContent(block); } else if (style.isFloated()) { FloatLayoutResult layoutResult = LayoutUtil.layoutFloated( c, current, block, available, pendingFloats); if (layoutResult.isPending()) { pendingFloats.add(layoutResult); } else { result = layoutResult.getBlock().getWidth(); current.addNonFlowContent(layoutResult.getBlock()); } } else if (style.isRunning()) { block.setStaticEquivalent(current); c.getRootLayer().addRunningBlock(block); } return result; }
public static void layoutAbsolute( LayoutContext c, LineBox currentLine, BlockBox box) { MarkerData markerData = c.getCurrentMarkerData(); c.setCurrentMarkerData(null); box.setContainingBlock(c.getLayer().getMaster()); box.setStaticEquivalent(currentLine); // If printing, don't layout until we know where its going if (! c.isPrint()) { box.layout(c); } else { c.pushLayer(box); c.getLayer().setRequiresLayout(true); c.popLayer(); } c.setCurrentMarkerData(markerData); }
private static int processOutOfFlowContent( LayoutContext c, LineBox current, BlockBox block, int available, List pendingFloats) { int result = 0; CalculatedStyle style = block.getStyle(); if (style.isAbsolute() || style.isFixed()) { LayoutUtil.layoutAbsolute(c, current, block); current.addNonFlowContent(block); } else if (style.isFloated()) { FloatLayoutResult layoutResult = LayoutUtil.layoutFloated( c, current, block, available, pendingFloats); if (layoutResult.isPending()) { pendingFloats.add(layoutResult); } else { result = layoutResult.getBlock().getWidth(); current.addNonFlowContent(layoutResult.getBlock()); } } else if (style.isRunning()) { block.setStaticEquivalent(current); c.getRootLayer().addRunningBlock(block); } return result; }
public static void layoutAbsolute( LayoutContext c, LineBox currentLine, BlockBox box) { MarkerData markerData = c.getCurrentMarkerData(); c.setCurrentMarkerData(null); if (box.getStyle().isFixed()) { box.setContainingBlock(c.getRootLayer().getMaster().getContainingBlock()); } else { box.setContainingBlock(c.getLayer().getMaster()); } box.setStaticEquivalent(currentLine); // If printing, don't layout until we know where its going if (! c.isPrint()) { box.layout(c); } else { c.pushLayer(box); c.getLayer().setRequiresLayout(true); c.popLayer(); } c.setCurrentMarkerData(markerData); }
block.setStaticEquivalent(currentLine);
block.setStaticEquivalent(currentLine);