Fixed up handling of form element attributes slightly to match navigators handling of ALIGN; this is compatible with nav/IE and with the HTML4 DTD (because ALIGN is deprecated)

This commit is contained in:
kipp@netscape.com
1998-11-23 19:33:22 +00:00
parent cc0ca006db
commit a1b78fbf3b
10 changed files with 44 additions and 130 deletions
@@ -319,12 +319,7 @@ nsHTMLTextAreaElement::StringToAttribute(nsIAtom* aAttribute,
const nsString& aValue,
nsHTMLValue& aResult)
{
if (aAttribute == nsHTMLAtoms::align) {
if (nsGenericHTMLElement::ParseFormAlignValue(aValue, aResult)) {
return NS_CONTENT_ATTR_HAS_VALUE;
}
}
else if (aAttribute == nsHTMLAtoms::disabled) {
if (aAttribute == nsHTMLAtoms::disabled) {
aResult.SetEmptyValue();
return NS_CONTENT_ATTR_HAS_VALUE;
}
@@ -352,12 +347,6 @@ nsHTMLTextAreaElement::AttributeToString(nsIAtom* aAttribute,
nsHTMLValue& aValue,
nsString& aResult) const
{
if (aAttribute == nsHTMLAtoms::align) {
if (eHTMLUnit_Enumerated == aValue.GetUnit()) {
nsGenericHTMLElement::FormAlignValueToString(aValue, aResult);
return NS_CONTENT_ATTR_HAS_VALUE;
}
}
return mInner.AttributeToString(aAttribute, aValue, aResult);
}