зеркало из 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
|
// 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 ||
|
||||||
|
|
Загрузка…
Ссылка в новой задаче