support for css padding in table cells

git-svn-id: svn://10.0.0.236/trunk@32042 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
karnaze%netscape.com
1999-05-18 05:18:16 +00:00
parent dd79ec16b3
commit d6b03337dc
16 changed files with 190 additions and 142 deletions

View File

@@ -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);