aSpacingStyle.mBorder.SetTop(width); aSpacingStyle.mBorder.SetLeft(width); aSpacingStyle.mBorder.SetBottom(width); aSpacingStyle.mBorder.SetRight(width);
aBorderStyle.mBorder.SetTop(width); aBorderStyle.mBorder.SetLeft(width); aBorderStyle.mBorder.SetBottom(width); aBorderStyle.mBorder.SetRight(width);
void nsTableFrame::MapHTMLBorderStyle(nsStyleSpacing& aSpacingStyle, nscoord aBorderWidth){  nsStyleCoord  width;  width.SetCoordValue(aBorderWidth);  aSpacingStyle.mBorder.SetTop(width);  aSpacingStyle.mBorder.SetLeft(width);  aSpacingStyle.mBorder.SetBottom(width);  aSpacingStyle.mBorder.SetRight(width);  aSpacingStyle.SetBorderStyle(NS_SIDE_TOP, NS_STYLE_BORDER_STYLE_BG_OUTSET);  aSpacingStyle.SetBorderStyle(NS_SIDE_LEFT, NS_STYLE_BORDER_STYLE_BG_OUTSET);  aSpacingStyle.SetBorderStyle(NS_SIDE_BOTTOM, NS_STYLE_BORDER_STYLE_BG_OUTSET);  aSpacingStyle.SetBorderStyle(NS_SIDE_RIGHT, NS_STYLE_BORDER_STYLE_BG_OUTSET);  nsIStyleContext* styleContext = mStyleContext;   const nsStyleColor* colorData = (const nsStyleColor*)    styleContext->GetStyleData(eStyleStruct_Color);  // Look until we find a style context with a NON-transparent background color  while (styleContext)  {    if ((colorData->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT)!=0)    {      nsIStyleContext* temp = styleContext;      styleContext = styleContext->GetParent();      if (temp != mStyleContext)        NS_RELEASE(temp);      colorData = (const nsStyleColor*)styleContext->GetStyleData(eStyleStruct_Color);    }    else    {      break;    }  }  // Yaahoo, we found a style context which has a background color     nscolor borderColor = 0xFFC0C0C0;  if (styleContext != nsnull)  {    borderColor = colorData->mBackgroundColor;    if (styleContext != mStyleContext)      NS_RELEASE(styleContext);  }  // if the border color is white, then shift to grey  if (borderColor == 0xFFFFFFFF)    borderColor = 0xFFC0C0C0;  aSpacingStyle.SetBorderColor(NS_SIDE_TOP, borderColor);  aSpacingStyle.SetBorderColor(NS_SIDE_LEFT, borderColor);  aSpacingStyle.SetBorderColor(NS_SIDE_BOTTOM, borderColor);  aSpacingStyle.SetBorderColor(NS_SIDE_RIGHT, borderColor);}