if (getMaster().getStyle().isFixed()) { positionFixedLayer(c); }  if (! isInline() && ((BlockBox)getMaster()).isReplaced()) { paintReplacedElement(c, (BlockBox)getMaster()); } else { List blocks = new ArrayList(); List lines = new ArrayList();  BoxCollector collector = new BoxCollector(); collector.collect(c, c.getGraphics().getClip(), this, blocks, lines);   if (! isInline()) { paintLayerBackgroundAndBorder(c); if (c.debugDrawBoxes()) { ((BlockBox)getMaster()).paintDebugOutline(c); } }  if (isRootLayer() || isStackingContext()) { paintLayers(c, getSortedLayers(NEGATIVE)); }  paintBackgroundsAndBorders(c, blocks); paintFloats(c); paintListMarkers(c, blocks); paintInlineContent(c, lines); paintReplacedElements(c, blocks);  if (isRootLayer() || isStackingContext()) { paintLayers(c, collectLayers(AUTO));  paintLayers(c, getSortedLayers(ZERO)); paintLayers(c, getSortedLayers(POSITIVE)); } }
paint(c, originX, originY, false);
    public void paint(RenderingContext c, int originX, int originY) {        if (getMaster().getStyle().isFixed()) {            positionFixedLayer(c);        }        if (! isInline() && ((BlockBox)getMaster()).isReplaced()) {            paintReplacedElement(c, (BlockBox)getMaster());        } else {            List blocks = new ArrayList();            List lines = new ArrayList();                BoxCollector collector = new BoxCollector();            collector.collect(c, c.getGraphics().getClip(), this, blocks, lines);                // TODO root layer needs to be handled correctly (paint over entire canvas)            if (! isInline()) {                paintLayerBackgroundAndBorder(c);                if (c.debugDrawBoxes()) {                    ((BlockBox)getMaster()).paintDebugOutline(c);                }            }                        if (isRootLayer() || isStackingContext()) {                paintLayers(c, getSortedLayers(NEGATIVE));            }                paintBackgroundsAndBorders(c, blocks);            paintFloats(c);            paintListMarkers(c, blocks);            paintInlineContent(c, lines);            paintReplacedElements(c, blocks);                if (isRootLayer() || isStackingContext()) {                paintLayers(c, collectLayers(AUTO));                // TODO z-index: 0 layers should be painted atomically                paintLayers(c, getSortedLayers(ZERO));                paintLayers(c, getSortedLayers(POSITIVE));            }        }    }