public Value computeValue(CSSStylableElement elt, String pseudo, CSSEngine engine, int idx, StyleMap sm, Value value) { switch (value.getPrimitiveType()) { case CSSPrimitiveValue.CSS_PERCENTAGE: { sm.putFontSizeRelative(idx, true); float v = value.getFloatValue(); int fsidx = engine.getFontSizeIndex(); float fs; fs = engine.getComputedStyle(elt, pseudo, fsidx).getFloatValue(); return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v * fs / 100); } // XXX What about INTEGER AND REAL? case CSSPrimitiveValue.CSS_NUMBER: { // for line-height the number refers to multiples of the font size sm.putFontSizeRelative(idx, true); float v = value.getFloatValue(); int fsidx = engine.getFontSizeIndex(); float fs; fs = engine.getComputedStyle(elt, pseudo, fsidx).getFloatValue(); return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v * fs); } } return super.computeValue(elt, pseudo, engine, idx, sm, value); }
int fsidx = engine.getFontSizeIndex(); float fs = engine.getComputedStyle (elt, pseudo, fsidx).getFloatValue();
int fsidx = engine.getFontSizeIndex(); float fs = engine.getComputedStyle (elt, pseudo, fsidx).getFloatValue();
int fsidx = engine.getFontSizeIndex(); float fs = engine.getComputedStyle (elt, pseudo, fsidx).getFloatValue();
int fsidx = engine.getFontSizeIndex(); float fs; fs = engine.getComputedStyle(elt, pseudo, fsidx).getFloatValue(); fsidx = engine.getFontSizeIndex(); fs = engine.getComputedStyle(elt, pseudo, fsidx).getFloatValue(); return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v * fs * 0.5f);
int fsidx = engine.getFontSizeIndex(); float fs; fs = engine.getComputedStyle(elt, pseudo, fsidx).getFloatValue(); fsidx = engine.getFontSizeIndex(); fs = engine.getComputedStyle(elt, pseudo, fsidx).getFloatValue(); return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v * fs * 0.5f);
int fsidx = engine.getFontSizeIndex(); float fs; fs = engine.getComputedStyle(elt, pseudo, fsidx).getFloatValue(); fsidx = engine.getFontSizeIndex(); fs = engine.getComputedStyle(elt, pseudo, fsidx).getFloatValue(); return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, v * fs * 0.5f);