adjusted sizing for text controls; default control is text; assertion cleanup

This commit is contained in:
karnaze%netscape.com 1998-08-10 04:28:17 +00:00
parent 9b7ad6e4ad
commit 6837a9ba6b
5 changed files with 6 additions and 5 deletions

View File

@ -1964,7 +1964,7 @@ nsresult HTMLContentSink::ProcessINPUTTag(nsIHTMLContent** aInstancePtrResult,
// rv = NS_NewHTMLFrameset(aInstancePtrResult, atom, mWebWidget, 3);
}
else {
rv = NS_NewHTMLInputSubmit(aInstancePtrResult, atom, mCurrentForm);
rv = NS_NewHTMLInputText(aInstancePtrResult, atom, mCurrentForm); // XXX fix this on branch
}
}

View File

@ -1964,7 +1964,7 @@ nsresult HTMLContentSink::ProcessINPUTTag(nsIHTMLContent** aInstancePtrResult,
// rv = NS_NewHTMLFrameset(aInstancePtrResult, atom, mWebWidget, 3);
}
else {
rv = NS_NewHTMLInputSubmit(aInstancePtrResult, atom, mCurrentForm);
rv = NS_NewHTMLInputText(aInstancePtrResult, atom, mCurrentForm); // XXX fix this on branch
}
}

View File

@ -294,7 +294,7 @@ nsInputButton::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
return PR_TRUE;
}
else if ((kButton_Submit == mType) || (kButton_Hidden == mType) && (nsnull != mValue)) {
else if (((kButton_Submit == mType) || (kButton_Hidden == mType)) && (nsnull != mValue)) { // XXX fix this in branch
aValues[0] = *mValue;
aNames[0] = *mName;
aNumValues = 1;

View File

@ -100,10 +100,11 @@ nscoord nsInputTextFrame::GetVerticalInsidePadding(float aPixToTwip,
#ifdef XP_PC
nsAutoString type;
((nsInput*)mContent)->GetType(type);
nscoord fudge = NSIntPixelsToTwips(2, aPixToTwip);
if (type.EqualsIgnoreCase("textarea")) {
return (nscoord)NSToIntRound(float(aInnerHeight) * 0.40f);
} else {
return (nscoord)NSToIntRound(float(aInnerHeight) * 0.25f);
return (nscoord)NSToIntRound(float(aInnerHeight) * 0.20f) + fudge;
}
#endif
#ifdef XP_UNIX

View File

@ -491,7 +491,7 @@ nsSelect::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
nsString* aValues, nsString* aNames)
{
if ((aMaxNumValues <= 0) || (nsnull == mName)) {
NS_ASSERTION(0, "invalid max num values");
//NS_ASSERTION(0, "invalid max num values"); // XXX remove this in branch
return PR_FALSE;
}