col and colgroup attribute handling

colgroup pseudo frame for cols inserted directly into a table.  More like this to come...


git-svn-id: svn://10.0.0.236/trunk@14512 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
buster%netscape.com
1998-11-12 18:37:28 +00:00
parent 71662f0d55
commit eeaf9cbedd
16 changed files with 276 additions and 91 deletions

View File

@@ -154,7 +154,7 @@ nsHTMLTableColGroupElement::StringToAttribute(nsIAtom* aAttribute,
nsGenericHTMLElement::ParseValue(aValue, 0, aResult, eHTMLUnit_Integer);
return NS_CONTENT_ATTR_HAS_VALUE;
}
else if (aAttribute == nsHTMLAtoms::repeat) {
else if (aAttribute == nsHTMLAtoms::span) {
nsGenericHTMLElement::ParseValue(aValue, 1, aResult, eHTMLUnit_Integer);
return NS_CONTENT_ATTR_HAS_VALUE;
}
@@ -249,6 +249,14 @@ MapAttributesInto(nsIHTMLAttributes* aAttributes,
textStyle = (nsStyleText*)aContext->GetMutableStyleData(eStyleStruct_Text);
textStyle->mVerticalAlign.SetIntValue(value.GetIntValue(), eStyleUnit_Enumerated);
}
// span: int
aAttributes->GetAttribute(nsHTMLAtoms::span, value);
if (value.GetUnit() == eHTMLUnit_Integer)
{
nsStyleTable *tableStyle = (nsStyleTable*)aContext->GetMutableStyleData(eStyleStruct_Table);
tableStyle->mSpan = value.GetIntValue();
}
}
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
}