Border border = style.getBorderWidth(c.getCtx());
BorderPropertySet border = style.getBorder(c.getCtx());
    private static int handleInlineElementEnd(Context c, LinkedList decorations, InlineBox ib, int padX, LineBox line, LinkedList pushedStyles) {        //end text decoration?        IdentValue decoration = ib.getStyle().getCalculatedStyle().getIdent(CSSName.TEXT_DECORATION);        if (decoration != IdentValue.NONE) {            TextDecoration td = (TextDecoration) decorations.getLast();            td.setEnd(ib.x + padX);            td.paint(c, line);            decorations.removeLast();        }        //right padding for this inline element        CalculatedStyle style = ib.getStyle().getCalculatedStyle();        int parent_width = line.getParent().getWidth();        Border border = style.getBorderWidth(c.getCtx());        //note: percentages here refer to width of containing block        RectPropertySet margin = style.getMarginRect(parent_width, parent_width, c.getCtx());        RectPropertySet padding = style.getPaddingRect(parent_width, parent_width, c.getCtx());        paintRightPadding(c, line, ib, padX, border, padding);        // CLEAN: cast to int        padX += (int)padding.right() + border.right;        Relative.untranslateRelative(c, ib.getStyle().getCalculatedStyle(), true);        c.popStyle();        if (pushedStyles != null) pushedStyles.removeLast();        // TODO What does this do?        style = c.getCurrentStyle();        //border = style.getBorderWidth(c.getCtx());        //note: percentages here refer to width of containing block        margin = style.getMarginRect(parent_width, parent_width, c.getCtx());        //padding = style.getPaddingRect(parent_width, parent_width, c.getCtx());        // CLEAN: cast to int        paintMargin(c, line, ib, padX, (int)margin.right());        padX += margin.right();        return padX;    }