cellspacing split out into x and y, HTML attribute sets both to same value

This commit is contained in:
buster%netscape.com 1998-12-09 06:36:32 +00:00
parent 5cbf93ec0f
commit 80cbbfefb7
2 changed files with 8 additions and 4 deletions

View File

@ -1155,13 +1155,15 @@ MapAttributesInto(nsIHTMLAttributes* aAttributes,
if (value.GetUnit() == eHTMLUnit_Pixel) {
if (nsnull==tableStyle)
tableStyle = (nsStyleTable*)aContext->GetMutableStyleData(eStyleStruct_Table);
tableStyle->mCellSpacing.SetCoordValue(NSIntPixelsToTwips(value.GetPixelValue(), p2t));
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->mCellSpacing.SetCoordValue(NSIntPixelsToTwips(2, p2t));
tableStyle->mBorderSpacingX.SetCoordValue(NSIntPixelsToTwips(2, p2t));
tableStyle->mBorderSpacingY.SetCoordValue(NSIntPixelsToTwips(2, p2t));
}
// cols

View File

@ -1155,13 +1155,15 @@ MapAttributesInto(nsIHTMLAttributes* aAttributes,
if (value.GetUnit() == eHTMLUnit_Pixel) {
if (nsnull==tableStyle)
tableStyle = (nsStyleTable*)aContext->GetMutableStyleData(eStyleStruct_Table);
tableStyle->mCellSpacing.SetCoordValue(NSIntPixelsToTwips(value.GetPixelValue(), p2t));
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->mCellSpacing.SetCoordValue(NSIntPixelsToTwips(2, p2t));
tableStyle->mBorderSpacingX.SetCoordValue(NSIntPixelsToTwips(2, p2t));
tableStyle->mBorderSpacingY.SetCoordValue(NSIntPixelsToTwips(2, p2t));
}
// cols