Bug 55988 + 64415: Hidden inputs and buttons save state in session history, r=jst@netscape.com, sr=vidur@netscape.com

This commit is contained in:
pollmann@netscape.com
2001-02-06 01:31:18 +00:00
parent e17c5db60f
commit a08be7c00d
6 changed files with 166 additions and 18 deletions

View File

@@ -815,12 +815,23 @@ nsresult nsHTMLButtonControlFrame::RequiresWidget(PRBool& aRequiresWidget)
NS_IMETHODIMP nsHTMLButtonControlFrame::SetProperty(nsIPresContext* aPresContext,
nsIAtom* aName, const nsAReadableString& aValue)
{
if (nsHTMLAtoms::value == aName) {
nsCOMPtr<nsIHTMLContent> formControl(do_QueryInterface(mContent));
if (formControl) {
return formControl->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::value, aValue, PR_TRUE);
}
}
return NS_OK;
}
NS_IMETHODIMP nsHTMLButtonControlFrame::GetProperty(nsIAtom* aName, nsAWritableString& aValue)
{
aValue.Truncate();
if (nsHTMLAtoms::value == aName) {
nsCOMPtr<nsIHTMLContent> formControl(do_QueryInterface(mContent));
if (formControl) {
formControl->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::value, aValue);
}
}
return NS_OK;
}