mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 349259 patch 2: Prevent html:input elements from having a line-height smaller than 1. r=bz
This commit is contained in:
parent
2d1064d968
commit
9a38e7f2eb
@ -2485,6 +2485,16 @@ nsHTMLReflowState::CalcLineHeight(nsIContent* aContent,
|
||||
|
||||
NS_ASSERTION(lineHeight >= 0, "ComputeLineHeight screwed up");
|
||||
|
||||
if (aContent && aContent->IsHTML(nsGkAtoms::input)) {
|
||||
// For Web-compatibility, input elements cannot have a line-height
|
||||
// smaller than one.
|
||||
nscoord lineHeightOne =
|
||||
aFontSizeInflation * aStyleContext->StyleFont()->mFont.size;
|
||||
if (lineHeight < lineHeightOne) {
|
||||
lineHeight = lineHeightOne;
|
||||
}
|
||||
}
|
||||
|
||||
return lineHeight;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user