Checking in John Keiser's <jkeiser@iname.com> fix for *tons* of form submission and <select> related bugs, see tracking bug 34297 for details. r=rods@netscape.com, sr=jst@netscape.com

This commit is contained in:
jst@netscape.com
2001-11-02 07:40:01 +00:00
parent 9171a06000
commit af4947ee24
91 changed files with 4489 additions and 7525 deletions

View File

@@ -206,23 +206,6 @@ nsFileControlFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
return nsHTMLContainerFrame::QueryInterface(aIID, aInstancePtr);
}
PRBool
nsFileControlFrame::IsSuccessful(nsIFormControlFrame* aSubmitter)
{
nsAutoString name;
PRBool disabled = PR_FALSE;
nsFormControlHelper::GetDisabled(mContent, &disabled);
return !disabled && (NS_CONTENT_ATTR_HAS_VALUE == GetName(&name));
}
void
nsFileControlFrame::Reset(nsIPresContext* aPresContext)
{
if (mTextFrame) {
mTextFrame->Reset(aPresContext);
}
}
NS_IMETHODIMP
nsFileControlFrame::GetType(PRInt32* aType) const
{
@@ -506,7 +489,7 @@ nsFileControlFrame::GetSkipSides() const
NS_IMETHODIMP
nsFileControlFrame::GetName(nsString* aResult)
nsFileControlFrame::GetName(nsAString* aResult)
{
nsresult result = NS_FORM_NOTOK;
if (mContent) {
@@ -527,34 +510,6 @@ nsFileControlFrame::GetName(nsString* aResult)
}
PRInt32
nsFileControlFrame::GetMaxNumValues()
{
return 1;
}
PRBool
nsFileControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
nsString* aValues, nsString* aNames)
{
nsAutoString name;
nsresult result = GetName(&name);
if ((aMaxNumValues <= 0) || (NS_CONTENT_ATTR_HAS_VALUE != result)) {
return PR_FALSE;
}
// use our name and the text widgets value
aNames[0] = name;
nsresult status = PR_FALSE;
if (NS_SUCCEEDED(mTextFrame->GetProperty(nsHTMLAtoms::value, aValues[0]))) {
aNumValues = 1;
status = PR_TRUE;
}
return status;
}
NS_IMETHODIMP
nsFileControlFrame::AttributeChanged(nsIPresContext* aPresContext,
nsIContent* aChild,
@@ -753,3 +708,9 @@ nsFileControlFrame::RestoreState(nsIPresContext* aPresContext, nsIPresState* aSt
return NS_OK;
}
NS_IMETHODIMP
nsFileControlFrame::OnContentReset()
{
return NS_OK;
}