From 45439665bdf3b89ea45a8bf53049732a2d16e082 Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Tue, 12 Oct 2004 17:58:28 +0000 Subject: [PATCH] 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 . r=bernd sr=dbaron --- layout/forms/nsTextControlFrame.cpp | 2 +- layout/html/forms/src/nsTextControlFrame.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp index d049ad995f80..2fcd0c9956ca 100644 --- a/layout/forms/nsTextControlFrame.cpp +++ b/layout/forms/nsTextControlFrame.cpp @@ -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); diff --git a/layout/html/forms/src/nsTextControlFrame.cpp b/layout/html/forms/src/nsTextControlFrame.cpp index d049ad995f80..2fcd0c9956ca 100644 --- a/layout/html/forms/src/nsTextControlFrame.cpp +++ b/layout/html/forms/src/nsTextControlFrame.cpp @@ -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);