Layer parent = this.layer; while (! parent.isStackingContext()) { parent = parent.getParent();
Layer parent = this.layer; if (master.getStyle().isFixed()) { while (parent.getParent() != null) { parent = parent.getParent(); } } else { while (! parent.isStackingContext()) { parent = parent.getParent(); }
    public void pushLayer(Box master) {        Layer layer = null;                if (rootLayer == null) {            layer = new Layer(master);            rootLayer = layer;        } else {            Layer parent = this.layer;            while (! parent.isStackingContext()) {                parent = parent.getParent();            }                        layer = new Layer(parent, master);            parent.addChild(layer);        }                layer_stack.push(this.layer);        this.layer = layer;    }