decorations.addLast(new TextDecoration(decoration, ib.x + (int)margin.left() + border.left + (int)padding.left(), c.getCurrentStyle().getColor(), FontUtil.getLineMetrics(c, null)));
decorations.addLast(new TextDecoration(decoration, ib.x + (int)margin.left() + (int)border.left() + (int)padding.left(), c.getCurrentStyle().getColor(), FontUtil.getLineMetrics(c, null)));
    private static int handleInlineElementStart(Context c, LineBox line, InlineBox ib, int padX, LinkedList decorations) {        // NOT RIGHT (ib.getStyle()...), refers to previous inline? Comment out for now        /*        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        Border margin = style.getMarginRect(parent_width, parent_width, c.getCtx());        //Border padding = style.getPaddingRect(parent_width, parent_width, c.getCtx());        paintMargin(c, line, ib, padX, margin.left);        */        int parent_width = line.getParent().getWidth();        //Now we know that an inline element started here, handle borders and such        Relative.translateRelative(c, ib.getStyle().getCalculatedStyle(), true);        CalculatedStyle style = ib.getStyle().getCalculatedStyle();        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());        //left padding for this inline element        //paintLeftPadding takes the margin into account        paintLeftPadding(c, line, ib, padX, margin, border, padding);        // CLEAN: cast to int        padX += (int)margin.left() + border.left + (int)padding.left();        //text decoration?        IdentValue decoration = c.getCurrentStyle().getIdent(CSSName.TEXT_DECORATION);        if (decoration != IdentValue.NONE) {            // CLEAN: cast to int            decorations.addLast(new TextDecoration(decoration, ib.x + (int)margin.left() + border.left + (int)padding.left(), c.getCurrentStyle().getColor(), FontUtil.getLineMetrics(c, null)));        }        return padX;    }