public BlockFormattingContext(Box master, Context c) { int parent_width = (int) c.getExtents().getWidth(); CalculatedStyle style = c.getCurrentStyle(); Border border = style.getBorderWidth(c.getCtx());  Border margin = master.getMarginWidth(c, parent_width); padding = style.getPaddingWidth(parent_width, parent_width, c.getCtx()); insets = new Border(margin.top + border.top + padding.top, padding.right + border.right + margin.right, padding.bottom + border.bottom + margin.bottom, margin.left + border.left + padding.left); this.master = master; master.setBlockFormattingContext(this); left_floats = new ArrayList(); right_floats = new ArrayList(); offset_map = new HashMap(); abs_bottom = new ArrayList();
public BlockFormattingContext(PersistentBFC p) { persistentBFC = p;
    public BlockFormattingContext(Box master, Context c) {        int parent_width = (int) c.getExtents().getWidth();        CalculatedStyle style = c.getCurrentStyle();        Border border = style.getBorderWidth(c.getCtx());        //note: percentages here refer to width of containing block        Border margin = master.getMarginWidth(c, parent_width);        padding = style.getPaddingWidth(parent_width, parent_width, c.getCtx());        insets = new Border(margin.top + border.top + padding.top,                padding.right + border.right + margin.right,                padding.bottom + border.bottom + margin.bottom,                margin.left + border.left + padding.left);        this.master = master;        master.setBlockFormattingContext(this);        left_floats = new ArrayList();        right_floats = new ArrayList();        offset_map = new HashMap();        abs_bottom = new ArrayList();    }