Make CheckFontProperties consider font-size:larger and font-size:smaller as well. b=388548 r+sr=bzbarsky

This commit is contained in:
dbaron@dbaron.org 2007-07-22 10:57:35 -07:00
Родитель 3945296b61
Коммит 0025130d35
1 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -706,10 +706,14 @@ CheckFontCallback(const nsRuleDataStruct& aData,
} }
} }
// em, ex, and percentage values for font size require inheritance // em, ex, percent, 'larger', and 'smaller' values on font-size depend
if ((fontData.mSize.IsRelativeLengthUnit() && // on the parent context's font-size
fontData.mSize.GetUnit() != eCSSUnit_Pixel) || const nsCSSValue& size = fontData.mSize;
fontData.mSize.GetUnit() == eCSSUnit_Percent) { if ((size.IsRelativeLengthUnit() && size.GetUnit() != eCSSUnit_Pixel) ||
size.GetUnit() == eCSSUnit_Percent ||
(size.GetUnit() == eCSSUnit_Enumerated &&
(size.GetIntValue() == NS_STYLE_FONT_SIZE_SMALLER ||
size.GetIntValue() == NS_STYLE_FONT_SIZE_LARGER))) {
NS_ASSERTION(aResult == nsRuleNode::eRulePartialReset || NS_ASSERTION(aResult == nsRuleNode::eRulePartialReset ||
aResult == nsRuleNode::eRuleFullReset || aResult == nsRuleNode::eRuleFullReset ||
aResult == nsRuleNode::eRulePartialMixed || aResult == nsRuleNode::eRulePartialMixed ||