if (! ParseVariant(aErrorCode, lineHeight, VARIANT_NUMBER | VARIANT_LP | VARIANT_NORMAL, nsnull)) {
if (! ParsePositiveVariant(aErrorCode, lineHeight, VARIANT_NUMBER | VARIANT_LP | VARIANT_NORMAL, nsnull)) {
PRBool CSSParserImpl::ParseFont(nsresult& aErrorCode){  static const nsCSSProperty fontIDs[] = {    eCSSProperty_font_style,    eCSSProperty_font_variant,    eCSSProperty_font_weight  };  nsCSSValue  family;  if (ParseVariant(aErrorCode, family, VARIANT_HK, nsCSSProps::kFontKTable)) {    if (ExpectEndProperty(aErrorCode, PR_TRUE)) {      if (eCSSUnit_Inherit == family.GetUnit()) {        AppendValue(eCSSProperty_font_family, family);        AppendValue(eCSSProperty_font_style, family);        AppendValue(eCSSProperty_font_variant, family);        AppendValue(eCSSProperty_font_weight, family);        AppendValue(eCSSProperty_font_size, family);        AppendValue(eCSSProperty_line_height, family);        AppendValue(eCSSProperty_font_stretch, family);        AppendValue(eCSSProperty_font_size_adjust, family);      }      else {        AppendValue(eCSSProperty_font_family, family);  // keyword value overrides everything else        nsCSSValue empty;        AppendValue(eCSSProperty_font_style, empty);        AppendValue(eCSSProperty_font_variant, empty);        AppendValue(eCSSProperty_font_weight, empty);        AppendValue(eCSSProperty_font_size, empty);        AppendValue(eCSSProperty_line_height, empty);        AppendValue(eCSSProperty_font_stretch, empty);        AppendValue(eCSSProperty_font_size_adjust, empty);      }      return PR_TRUE;    }    return PR_FALSE;  }  // Get optional font-style, font-variant and font-weight (in any order)  const PRInt32 numProps = 3;  nsCSSValue  values[numProps];  PRInt32 found = ParseChoice(aErrorCode, values, fontIDs, numProps);  if ((found < 0) || (eCSSUnit_Inherit == values[0].GetUnit()) ||       (eCSSUnit_Initial == values[0].GetUnit())) { // illegal data    return PR_FALSE;  }  if ((found & 1) == 0) {    // Provide default font-style    values[0].SetNormalValue();  }  if ((found & 2) == 0) {    // Provide default font-variant    values[1].SetNormalValue();  }  if ((found & 4) == 0) {    // Provide default font-weight    values[2].SetNormalValue();  }  // Get mandatory font-size  nsCSSValue  size;  if (! ParseVariant(aErrorCode, size, VARIANT_KEYWORD | VARIANT_LP, nsCSSProps::kFontSizeKTable)) {    return PR_FALSE;  }  // Get optional "/" line-height  nsCSSValue  lineHeight;  if (ExpectSymbol(aErrorCode, '/', PR_TRUE)) {    if (! ParseVariant(aErrorCode, lineHeight, VARIANT_NUMBER | VARIANT_LP | VARIANT_NORMAL, nsnull)) {      return PR_FALSE;    }  }  else {    lineHeight.SetNormalValue();  }  // Get final mandatory font-family  if (ParseFamily(aErrorCode, family)) {    if ((eCSSUnit_Inherit != family.GetUnit()) && (eCSSUnit_Initial != family.GetUnit()) &&        ExpectEndProperty(aErrorCode, PR_TRUE)) {      AppendValue(eCSSProperty_font_family, family);      AppendValue(eCSSProperty_font_style, values[0]);      AppendValue(eCSSProperty_font_variant, values[1]);      AppendValue(eCSSProperty_font_weight, values[2]);      AppendValue(eCSSProperty_font_size, size);      AppendValue(eCSSProperty_line_height, lineHeight);      AppendValue(eCSSProperty_font_stretch, nsCSSValue(eCSSUnit_Normal));      AppendValue(eCSSProperty_font_size_adjust, nsCSSValue(eCSSUnit_None));      return PR_TRUE;    }  }  return PR_FALSE;}