Make computed style handle "normal" for line-height by computing an actualnumeric height. Bug 371041, r+sr=dbaron

This commit is contained in:
2007-05-04 22:30:10 -07:00
parent 76538b769a
commit 360d80f492
11 changed files with 159 additions and 82 deletions

View File

@@ -1282,9 +1282,7 @@ nsTextControlFrame::CalcIntrinsicSize(nsIRenderingContext* aRenderingContext,
NS_ENSURE_SUCCESS(rv, rv);
aRenderingContext->SetFont(fontMet);
nsPresContext* presContext = PresContext();
lineHeight = nsHTMLReflowState::CalcLineHeight(presContext,
aRenderingContext,
lineHeight = nsHTMLReflowState::CalcLineHeight(aRenderingContext,
this);
fontMet->GetAveCharWidth(charWidth);
fontMet->GetMaxAdvance(charMaxAdvance);
@@ -1313,7 +1311,7 @@ nsTextControlFrame::CalcIntrinsicSize(nsIRenderingContext* aRenderingContext,
} else {
// This is to account for the anonymous <br> having a 1 twip width
// in Full Standards mode, see BRFrame::Reflow and bug 228752.
if (presContext->CompatibilityMode() == eCompatibility_FullStandards) {
if (PresContext()->CompatibilityMode() == eCompatibility_FullStandards) {
aIntrinsicSize.width += 1;
}
}