Cleaned up attribute parsing so that illegal values are preserved as strings

git-svn-id: svn://10.0.0.236/trunk@40994 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterl%netscape.com
1999-07-24 19:55:35 +00:00
parent 9e00c35297
commit 4c73c7609e
61 changed files with 619 additions and 683 deletions

View File

@@ -137,18 +137,21 @@ nsHTMLDivElement::StringToAttribute(nsIAtom* aAttribute,
return NS_CONTENT_ATTR_HAS_VALUE;
}
}
if (aAttribute == nsHTMLAtoms::cols) {
nsGenericHTMLElement::ParseValue(aValue, 0, aResult, eHTMLUnit_Integer);
return NS_CONTENT_ATTR_HAS_VALUE;
else if (aAttribute == nsHTMLAtoms::cols) {
if (nsGenericHTMLElement::ParseValue(aValue, 0, aResult, eHTMLUnit_Integer)) {
return NS_CONTENT_ATTR_HAS_VALUE;
}
}
if (aAttribute == nsHTMLAtoms::gutter) {
nsGenericHTMLElement::ParseValue(aValue, 1, aResult, eHTMLUnit_Pixel);
return NS_CONTENT_ATTR_HAS_VALUE;
else if (aAttribute == nsHTMLAtoms::gutter) {
if (nsGenericHTMLElement::ParseValue(aValue, 1, aResult, eHTMLUnit_Pixel)) {
return NS_CONTENT_ATTR_HAS_VALUE;
}
}
if (aAttribute == nsHTMLAtoms::width) {
nsGenericHTMLElement::ParseValueOrPercent(aValue, aResult,
eHTMLUnit_Pixel);
return NS_CONTENT_ATTR_HAS_VALUE;
else if (aAttribute == nsHTMLAtoms::width) {
if (nsGenericHTMLElement::ParseValueOrPercent(aValue, aResult,
eHTMLUnit_Pixel)) {
return NS_CONTENT_ATTR_HAS_VALUE;
}
}
return NS_CONTENT_ATTR_NOT_THERE;
}