nscoord capHeight = ((aFont->mFont.size / 3) * 2);
nscoord capHeight = ((aFont.size / 3) * 2);
nscoord CalcLength(const nsCSSValue& aValue,                   const nsStyleFont* aFont,                    nsIPresContext* aPresContext){  NS_ASSERTION(aValue.IsLengthUnit(), "not a length unit");  if (aValue.IsFixedLengthUnit()) {    return aValue.GetLengthTwips();  }  nsCSSUnit unit = aValue.GetUnit();  switch (unit) {    case eCSSUnit_EM:      return NSToCoordRound(aValue.GetFloatValue() * (float)aFont->mFont.size);      // XXX scale against font metrics height instead    case eCSSUnit_EN:      return NSToCoordRound((aValue.GetFloatValue() * (float)aFont->mFont.size) / 2.0f);    case eCSSUnit_XHeight: {      nsIFontMetrics* fm;      aPresContext->GetMetricsFor(aFont->mFont, &fm);      NS_ASSERTION(nsnull != fm, "can't get font metrics");      nscoord xHeight;      if (nsnull != fm) {        fm->GetXHeight(xHeight);        NS_RELEASE(fm);      }      else {        xHeight = ((aFont->mFont.size * 2) / 3);      }      return NSToCoordRound(aValue.GetFloatValue() * (float)xHeight);    }    case eCSSUnit_CapHeight: {      NS_NOTYETIMPLEMENTED("cap height unit");      nscoord capHeight = ((aFont->mFont.size / 3) * 2); // XXX HACK!      return NSToCoordRound(aValue.GetFloatValue() * (float)capHeight);    }    case eCSSUnit_Pixel:      float p2t;      aPresContext->GetScaledPixelsToTwips(&p2t);      return NSFloatPixelsToTwips(aValue.GetFloatValue(), p2t);    default:      break;  }  return 0;}