support for css padding in table cells

This commit is contained in:
karnaze@netscape.com
1999-05-18 05:18:16 +00:00
parent f94c3667f4
commit 5848571fa7
16 changed files with 190 additions and 142 deletions
@@ -1176,6 +1176,7 @@ MapAttributesInto(nsIHTMLAttributes* aAttributes,
}
// cellspacing (reuses tableStyle if already resolved)
// ua.css sets cellspacing
aAttributes->GetAttribute(nsHTMLAtoms::cellspacing, value);
if (value.GetUnit() == eHTMLUnit_Pixel) {
if (nsnull==tableStyle)
@@ -1183,13 +1184,6 @@ MapAttributesInto(nsIHTMLAttributes* aAttributes,
tableStyle->mBorderSpacingX.SetCoordValue(NSIntPixelsToTwips(value.GetPixelValue(), p2t));
tableStyle->mBorderSpacingY.SetCoordValue(NSIntPixelsToTwips(value.GetPixelValue(), p2t));
}
else
{ // XXX: remove me as soon as we get this from the style sheet
if (nsnull==tableStyle)
tableStyle = (nsStyleTable*)aContext->GetMutableStyleData(eStyleStruct_Table);
tableStyle->mBorderSpacingX.SetCoordValue(NSIntPixelsToTwips(2, p2t));
tableStyle->mBorderSpacingY.SetCoordValue(NSIntPixelsToTwips(2, p2t));
}
// cols
aAttributes->GetAttribute(nsHTMLAtoms::cols, value);