replaced #define DEFAULT_PIXEL_WIDTH with nsTextControlFrame::GetDefaultColumnWidth()

git-svn-id: svn://10.0.0.236/trunk@45723 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
buster%netscape.com
1999-09-02 20:45:21 +00:00
parent 0cb716f347
commit c23a7f4749
2 changed files with 4 additions and 6 deletions

View File

@@ -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);