if (_cssName == CSSName.LINE_HEIGHT) { absVal = relVal * baseValue; } else {
if (_cssName == CSSName.FONT_SIZE) {
    private float calcFloatProportionalValue(float relVal, short primitiveType, float baseValue, RenderingContext ctx) {        float absVal = Float.MIN_VALUE;        // NOTE: absolute datatypes (px, pt, pc, cm, etc.) are converted once and stored.        // this could be done on instantiation, but it seems more clear to have all the calcs        // in one place. For this reason we use the member field boolean hasAbsCalculated to        // track if the calculation is already done.        switch (primitiveType) {            case CSSPrimitiveValue.CSS_PX:                // nothing to do                if (_hasAbsCalculated) {                    absVal = _absoluteLengthAsFloat;                } else {                    absVal = relVal;                    _absoluteLengthAsFloat = absVal;                    _hasAbsCalculated = true;                }                break;            case CSSPrimitiveValue.CSS_IN:                if (_hasAbsCalculated) {                    absVal = _absoluteLengthAsFloat;                } else {                    absVal = (((relVal * CM__PER__IN) * MM__PER__CM) / ctx.getMmPerPx());                    _absoluteLengthAsFloat = absVal;                    _hasAbsCalculated = true;                }                break;            case CSSPrimitiveValue.CSS_CM:                if (_hasAbsCalculated) {                    absVal = _absoluteLengthAsFloat;                } else {                    absVal = ((relVal * MM__PER__CM) / ctx.getMmPerPx());                    _absoluteLengthAsFloat = absVal;                    _hasAbsCalculated = true;                }                break;            case CSSPrimitiveValue.CSS_MM:                if (_hasAbsCalculated) {                    absVal = _absoluteLengthAsFloat;                } else {                    absVal = relVal / ctx.getMmPerPx();                    _absoluteLengthAsFloat = absVal;                    _hasAbsCalculated = true;                }                break;            case CSSPrimitiveValue.CSS_PT:                if (_hasAbsCalculated) {                    absVal = _absoluteLengthAsFloat;                } else {                    absVal = (((relVal * PT__PER__IN) * CM__PER__IN) * MM__PER__CM) / ctx.getMmPerPx();                    _absoluteLengthAsFloat = absVal;                    _hasAbsCalculated = true;                }                break;            case CSSPrimitiveValue.CSS_PC:                if (_hasAbsCalculated) {                    absVal = _absoluteLengthAsFloat;                } else {                    absVal = ((((relVal * PC__PER__PT) * PT__PER__IN) * CM__PER__IN) * MM__PER__CM) / ctx.getMmPerPx();                    _absoluteLengthAsFloat = absVal;                    _hasAbsCalculated = true;                }                break;            case CSSPrimitiveValue.CSS_EMS:                // EM is equal to font-size of element on which it is used                // The exception is when �em� occurs in the value of                // the �font-size� property itself, in which case it refers                // to the font size of the parent element (spec: 4.3.2)                if (_cssName == CSSName.LINE_HEIGHT) {                    absVal = relVal * baseValue;                } else {                    absVal = relVal * deriveFontSize(baseValue, ctx);                }                break;            case CSSPrimitiveValue.CSS_EXS:                // HACK: just to convert the value to something meaningful, using the height of the 'Xx' character                // on the default system font.                // To convert EMS to pixels, we need the height of the lowercase 'Xx' character in the current                // element...                // to the font size of the parent element (spec: 4.3.2)                if (_cssName == CSSName.LINE_HEIGHT) {                    absVal = relVal * baseValue;                } else {                    float xHeight = _style.getParent().getFloatPropertyProportionalHeight(CSSName.FONT_SIZE, baseValue, ctx);                    absVal = relVal * xHeight;                }                break;            case CSSPrimitiveValue.CSS_PERCENTAGE:                // percentage depends on the property this value belongs to                if (_cssName == CSSName.VERTICAL_ALIGN) {                    relVal = _style.getParent().getFloatPropertyProportionalHeight(CSSName.LINE_HEIGHT, baseValue, ctx);                } else if (_cssName == CSSName.FONT_SIZE) {                    // same as with EM                    baseValue = deriveFontSize(baseValue, ctx);                }                absVal = (relVal / 100F) * baseValue;                break;            default:                // nothing to do, we only convert those listed above                XRLog.cascade(Level.SEVERE,                        "Asked to convert " + _cssName + " from relative to absolute, " +                        " don't recognize the datatype " +                        "'" + ValueConstants.stringForSACPrimitiveType(_lengthPrimitiveType) + "' "                        + _lengthPrimitiveType + "(" + _domCSSPrimitiveValue.getCssText() + ")");        }        assert (new Float(absVal).intValue() > 0);        if (_cssName == CSSName.FONT_SIZE) {            XRLog.cascade(Level.FINEST, _cssName + ", relative= " +                    relVal + " (" + _domCSSPrimitiveValue.getCssText() + "), absolute= "                    + absVal);        } else {            XRLog.cascade(Level.FINEST, _cssName + ", relative= " +                    relVal + " (" + _domCSSPrimitiveValue.getCssText() + "), absolute= "                    + absVal + " using base=" + baseValue);        }        // round down        double d = Math.floor((double) absVal);        absVal = new Float(d).floatValue();        return absVal;    }