зеркало из https://github.com/mozilla/pjs.git
Make CheckFontProperties consider font-size:larger and font-size:smaller as well. b=388548 r+sr=bzbarsky
This commit is contained in:
Родитель
3945296b61
Коммит
0025130d35
|
@ -706,10 +706,14 @@ CheckFontCallback(const nsRuleDataStruct& aData,
|
|||
}
|
||||
}
|
||||
|
||||
// em, ex, and percentage values for font size require inheritance
|
||||
if ((fontData.mSize.IsRelativeLengthUnit() &&
|
||||
fontData.mSize.GetUnit() != eCSSUnit_Pixel) ||
|
||||
fontData.mSize.GetUnit() == eCSSUnit_Percent) {
|
||||
// em, ex, percent, 'larger', and 'smaller' values on font-size depend
|
||||
// on the parent context's font-size
|
||||
const nsCSSValue& size = fontData.mSize;
|
||||
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 ||
|
||||
aResult == nsRuleNode::eRuleFullReset ||
|
||||
aResult == nsRuleNode::eRulePartialMixed ||
|
||||
|
|
Загрузка…
Ссылка в новой задаче