Enable dynamic changing of the readonly attribute.

Works on Linux now.  Win will come on-line later today.
This commit is contained in:
pollmann%netscape.com 1999-02-26 20:01:48 +00:00
parent 08e5ad61d6
commit 6dcb7e30da
2 changed files with 6 additions and 0 deletions

View File

@ -400,6 +400,9 @@ nsTextControlFrame::AttributeChanged(nsIPresContext* aPresContext,
if (NS_CONTENT_ATTR_NOT_THERE != rv) {
text->SetMaxTextLength(maxLength);
}
} else if ((nsHTMLAtoms::readonly == aAttribute) && (nsnull != text)) {
PRBool oldReadOnly;
text->SetReadOnly(nsFormFrame::GetReadonly(this),oldReadOnly);
}
// Allow the base class to handle common attributes supported
// by all form elements...

View File

@ -400,6 +400,9 @@ nsTextControlFrame::AttributeChanged(nsIPresContext* aPresContext,
if (NS_CONTENT_ATTR_NOT_THERE != rv) {
text->SetMaxTextLength(maxLength);
}
} else if ((nsHTMLAtoms::readonly == aAttribute) && (nsnull != text)) {
PRBool oldReadOnly;
text->SetReadOnly(nsFormFrame::GetReadonly(this),oldReadOnly);
}
// Allow the base class to handle common attributes supported
// by all form elements...