From c23a7f4749890c2cf5ad2648cb00ee0fdcaebadd Mon Sep 17 00:00:00 2001 From: "buster%netscape.com" Date: Thu, 2 Sep 1999 20:45:21 +0000 Subject: [PATCH] replaced #define DEFAULT_PIXEL_WIDTH with nsTextControlFrame::GetDefaultColumnWidth() git-svn-id: svn://10.0.0.236/trunk@45723 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsTextControlFrame.cpp | 5 ++--- mozilla/layout/html/forms/src/nsTextControlFrame.cpp | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mozilla/layout/forms/nsTextControlFrame.cpp b/mozilla/layout/forms/nsTextControlFrame.cpp index 38cceafe85d..36656155f4c 100644 --- a/mozilla/layout/forms/nsTextControlFrame.cpp +++ b/mozilla/layout/forms/nsTextControlFrame.cpp @@ -204,7 +204,6 @@ nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext, GetDesiredSize(aPresContext, aReflowState, aDesiredLayoutSize, widgetSize); } -#define DEFAULT_PIXEL_WIDTH 20 void nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext, const nsHTMLReflowState& aReflowState, @@ -228,7 +227,7 @@ nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext, if ((NS_FORM_INPUT_TEXT == type) || (NS_FORM_INPUT_PASSWORD == type)) { PRInt32 width; if (NS_CONTENT_ATTR_HAS_VALUE != GetSizeFromContent(&width)) { - width = DEFAULT_PIXEL_WIDTH; + width = GetDefaultColumnWidth(); } //if (eCompatibility_NavQuirks == mode) { // width += 1; @@ -238,7 +237,7 @@ nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext, nsFormControlHelper::CalculateSize(aPresContext, aReflowState.rendContext, this, styleSize, textSpec, desiredSize, minSize, widthExplicit, heightExplicit, ignore); } else { - nsInputDimensionSpec areaSpec(nsHTMLAtoms::cols, PR_FALSE, nsnull, nsnull, DEFAULT_PIXEL_WIDTH, + nsInputDimensionSpec areaSpec(nsHTMLAtoms::cols, PR_FALSE, nsnull, nsnull, GetDefaultColumnWidth(), PR_FALSE, nsHTMLAtoms::rows, 1); nsFormControlHelper::CalculateSize(aPresContext, aReflowState.rendContext, this, styleSize, areaSpec, desiredSize, minSize, widthExplicit, heightExplicit, ignore); diff --git a/mozilla/layout/html/forms/src/nsTextControlFrame.cpp b/mozilla/layout/html/forms/src/nsTextControlFrame.cpp index 38cceafe85d..36656155f4c 100644 --- a/mozilla/layout/html/forms/src/nsTextControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsTextControlFrame.cpp @@ -204,7 +204,6 @@ nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext, GetDesiredSize(aPresContext, aReflowState, aDesiredLayoutSize, widgetSize); } -#define DEFAULT_PIXEL_WIDTH 20 void nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext, const nsHTMLReflowState& aReflowState, @@ -228,7 +227,7 @@ nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext, if ((NS_FORM_INPUT_TEXT == type) || (NS_FORM_INPUT_PASSWORD == type)) { PRInt32 width; if (NS_CONTENT_ATTR_HAS_VALUE != GetSizeFromContent(&width)) { - width = DEFAULT_PIXEL_WIDTH; + width = GetDefaultColumnWidth(); } //if (eCompatibility_NavQuirks == mode) { // width += 1; @@ -238,7 +237,7 @@ nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext, nsFormControlHelper::CalculateSize(aPresContext, aReflowState.rendContext, this, styleSize, textSpec, desiredSize, minSize, widthExplicit, heightExplicit, ignore); } else { - nsInputDimensionSpec areaSpec(nsHTMLAtoms::cols, PR_FALSE, nsnull, nsnull, DEFAULT_PIXEL_WIDTH, + nsInputDimensionSpec areaSpec(nsHTMLAtoms::cols, PR_FALSE, nsnull, nsnull, GetDefaultColumnWidth(), PR_FALSE, nsHTMLAtoms::rows, 1); nsFormControlHelper::CalculateSize(aPresContext, aReflowState.rendContext, this, styleSize, areaSpec, desiredSize, minSize, widthExplicit, heightExplicit, ignore);