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

This commit is contained in:
peterl@netscape.com
1999-07-24 19:55:35 +00:00
parent f7e3aff50a
commit 83ae953e4a
61 changed files with 617 additions and 681 deletions
@@ -133,17 +133,20 @@ nsHTMLFrameSetElement::StringToAttribute(nsIAtom* aAttribute,
nsHTMLValue& aResult)
{
if (aAttribute == nsHTMLAtoms::bordercolor) {
nsGenericHTMLElement::ParseColor(aValue, mInner.mDocument, aResult);
return NS_CONTENT_ATTR_HAS_VALUE;
if (nsGenericHTMLElement::ParseColor(aValue, mInner.mDocument, aResult)) {
return NS_CONTENT_ATTR_HAS_VALUE;
}
}
else if (aAttribute == nsHTMLAtoms::frameborder) {
// XXX need to check for correct mode
nsGenericHTMLElement::ParseFrameborderValue(PR_FALSE, aValue, aResult);
return NS_CONTENT_ATTR_HAS_VALUE;
if (nsGenericHTMLElement::ParseFrameborderValue(PR_FALSE, aValue, aResult)) {
return NS_CONTENT_ATTR_HAS_VALUE;
}
}
else if (aAttribute == nsHTMLAtoms::border) {
nsGenericHTMLElement::ParseValue(aValue, 0, 100, aResult, eHTMLUnit_Pixel);
return NS_CONTENT_ATTR_HAS_VALUE;
if (nsGenericHTMLElement::ParseValue(aValue, 0, 100, aResult, eHTMLUnit_Pixel)) {
return NS_CONTENT_ATTR_HAS_VALUE;
}
}
return NS_CONTENT_ATTR_NOT_THERE;
}