зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
8f4052f8a0
Коммит
38ffd75c2e
|
@ -3541,9 +3541,11 @@ nsComputedDOMStyle::GetLineHeightCoord(nscoord& aCoord)
|
||||||
// font->mSize as the font size. Adjust for that. Also adjust for
|
// font->mSize as the font size. Adjust for that. Also adjust for
|
||||||
// the text zoom, if any.
|
// the text zoom, if any.
|
||||||
const nsStyleFont* font = GetStyleFont();
|
const nsStyleFont* font = GetStyleFont();
|
||||||
aCoord = NSToCoordRound((float(aCoord) *
|
float fCoord = float(aCoord) / mPresShell->GetPresContext()->TextZoom();
|
||||||
(float(font->mSize) / float(font->mFont.size))) /
|
if (font->mFont.size != font->mSize) {
|
||||||
mPresShell->GetPresContext()->TextZoom());
|
fCoord = fCoord * (float(font->mSize) / float(font->mFont.size));
|
||||||
|
}
|
||||||
|
aCoord = NSToCoordRound(fCoord);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче