Bug 522320 bustage fix (handle 'normal' value for font-variant/font-style in two other places).

This commit is contained in:
Daniel Holbert 2009-10-21 17:05:07 -07:00
parent 85330d8cf3
commit 389de9359d
2 changed files with 4 additions and 4 deletions

View File

@ -977,11 +977,11 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty,
return NS_OK;
}
if (style.GetUnit() != eCSSUnit_Normal) {
if (style.GetIntValue() != NS_FONT_STYLE_NORMAL) {
AppendCSSValueToString(eCSSProperty_font_style, style, aValue);
aValue.Append(PRUnichar(' '));
}
if (variant.GetUnit() != eCSSUnit_Normal) {
if (variant.GetIntValue() != NS_FONT_VARIANT_NORMAL) {
AppendCSSValueToString(eCSSProperty_font_variant, variant, aValue);
aValue.Append(PRUnichar(' '));
}

View File

@ -7362,11 +7362,11 @@ CSSParserImpl::ParseFont()
}
if ((found & 1) == 0) {
// Provide default font-style
values[0].SetNormalValue();
values[0].SetIntValue(NS_FONT_STYLE_NORMAL, eCSSUnit_Enumerated);
}
if ((found & 2) == 0) {
// Provide default font-variant
values[1].SetNormalValue();
values[1].SetIntValue(NS_FONT_VARIANT_NORMAL, eCSSUnit_Enumerated);
}
if ((found & 4) == 0) {
// Provide default font-weight