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

git-svn-id: svn://10.0.0.236/trunk@16036 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
buster%netscape.com 1998-12-09 06:36:32 +00:00
parent 91804a7b1d
commit a85d3c902d
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