Bug 536758 - window.getComputedStyle().lineHeight to skip font size ratio adjustment for minimum font size when font sizes are 0. r=dbaron

This commit is contained in:
Atul Aggarwal 2011-11-01 12:36:50 +05:30
Родитель 8f4052f8a0
Коммит 38ffd75c2e
1 изменённых файлов: 5 добавлений и 3 удалений

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

@ -3541,9 +3541,11 @@ nsComputedDOMStyle::GetLineHeightCoord(nscoord& aCoord)
// font->mSize as the font size. Adjust for that. Also adjust for
// the text zoom, if any.
const nsStyleFont* font = GetStyleFont();
aCoord = NSToCoordRound((float(aCoord) *
(float(font->mSize) / float(font->mFont.size))) /
mPresShell->GetPresContext()->TextZoom());
float fCoord = float(aCoord) / mPresShell->GetPresContext()->TextZoom();
if (font->mFont.size != font->mSize) {
fCoord = fCoord * (float(font->mSize) / float(font->mFont.size));
}
aCoord = NSToCoordRound(fCoord);
return true;
}