Use |this| instead of getting the frame from the reflow state, since the frame from the reflow state is wrong when we're in a XUL textbox. b=263806 Patch from Hideo Saito <saito@densan.co.jp>. r=bernd sr=dbaron

This commit is contained in:
dbaron%dbaron.org 2004-10-12 17:58:28 +00:00
parent 7dd5f656a6
commit 45439665bd
2 changed files with 2 additions and 2 deletions

View File

@ -1599,7 +1599,7 @@ nsTextControlFrame::CalculateSizeStandard(nsPresContext* aPresContext,
NS_ENSURE_SUCCESS(rv, rv);
nsIRenderingContext* rendContext = aReflowState.rendContext;
rendContext->SetFont(fontMet);
lineHeight = aReflowState.CalcLineHeight(aPresContext, rendContext, aReflowState.frame);
lineHeight = aReflowState.CalcLineHeight(aPresContext, rendContext, this);
fontMet->GetAveCharWidth(charWidth);
fontMet->GetMaxAdvance(charMaxAdvance);

View File

@ -1599,7 +1599,7 @@ nsTextControlFrame::CalculateSizeStandard(nsPresContext* aPresContext,
NS_ENSURE_SUCCESS(rv, rv);
nsIRenderingContext* rendContext = aReflowState.rendContext;
rendContext->SetFont(fontMet);
lineHeight = aReflowState.CalcLineHeight(aPresContext, rendContext, aReflowState.frame);
lineHeight = aReflowState.CalcLineHeight(aPresContext, rendContext, this);
fontMet->GetAveCharWidth(charWidth);
fontMet->GetMaxAdvance(charMaxAdvance);