From ddbfa3ac95b73fa9adac8e619948c876c1d82e30 Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Sat, 18 Mar 2000 15:15:25 +0000 Subject: [PATCH] made sure "average" was initialized to zero change the setting of the font from mFixedFont to mFont for textfields b=18232,32254 r=sfraserfor 18232, self for 32254 git-svn-id: svn://10.0.0.236/trunk@63399 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsFormControlHelper.cpp | 4 ++-- mozilla/layout/html/forms/src/nsFormControlHelper.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/forms/nsFormControlHelper.cpp b/mozilla/layout/forms/nsFormControlHelper.cpp index 4522c806475..794c1240485 100644 --- a/mozilla/layout/forms/nsFormControlHelper.cpp +++ b/mozilla/layout/forms/nsFormControlHelper.cpp @@ -247,7 +247,7 @@ nsFormControlHelper::CalcNavQuirkSizing(nsIPresContext* aPresContext, nscoord width; nscoord hgt; nscoord height; - nscoord average; + nscoord average = 0; if ((NS_FORM_INPUT_TEXT == type) || (NS_FORM_INPUT_PASSWORD == type)) { average = (char1Width + char2Width) / 2; width = maxCharWidth; @@ -619,7 +619,7 @@ nsFormControlHelper::GetFont(nsIFormControlFrame * aFormFrame, case NS_FORM_INPUT_TEXT: case NS_FORM_TEXTAREA: case NS_FORM_INPUT_PASSWORD: - aFont = &styleFont->mFixedFont; + aFont = &styleFont->mFont; break; case NS_FORM_INPUT_BUTTON: case NS_FORM_INPUT_SUBMIT: diff --git a/mozilla/layout/html/forms/src/nsFormControlHelper.cpp b/mozilla/layout/html/forms/src/nsFormControlHelper.cpp index 4522c806475..794c1240485 100644 --- a/mozilla/layout/html/forms/src/nsFormControlHelper.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlHelper.cpp @@ -247,7 +247,7 @@ nsFormControlHelper::CalcNavQuirkSizing(nsIPresContext* aPresContext, nscoord width; nscoord hgt; nscoord height; - nscoord average; + nscoord average = 0; if ((NS_FORM_INPUT_TEXT == type) || (NS_FORM_INPUT_PASSWORD == type)) { average = (char1Width + char2Width) / 2; width = maxCharWidth; @@ -619,7 +619,7 @@ nsFormControlHelper::GetFont(nsIFormControlFrame * aFormFrame, case NS_FORM_INPUT_TEXT: case NS_FORM_TEXTAREA: case NS_FORM_INPUT_PASSWORD: - aFont = &styleFont->mFixedFont; + aFont = &styleFont->mFont; break; case NS_FORM_INPUT_BUTTON: case NS_FORM_INPUT_SUBMIT: