if(!aTableIsLTR) { if (NS_SIDE_RIGHT == aSide) { aSide = NS_SIDE_LEFT; } else if (NS_SIDE_LEFT == aSide) { aSide = NS_SIDE_RIGHT; } }
GetColorAndStyle(const nsIFrame*  aFrame,                 PRUint8          aSide,                 PRUint8&         aStyle,                 nscolor&         aColor,                 PRBool           aIgnoreTableEdge){  NS_PRECONDITION(aFrame, "null frame");  // initialize out arg  aColor = 0;  const nsStyleBorder* styleData = aFrame->GetStyleBorder();  aStyle = styleData->GetBorderStyle(aSide);  // if the rules marker is set, set the style either to none or remove the mask  if (NS_STYLE_BORDER_STYLE_RULES_MARKER & aStyle) {    if (aIgnoreTableEdge) {      aStyle = NS_STYLE_BORDER_STYLE_NONE;      return;    }    else {      aStyle &= ~NS_STYLE_BORDER_STYLE_RULES_MARKER;    }  }  if ((NS_STYLE_BORDER_STYLE_NONE == aStyle) ||      (NS_STYLE_BORDER_STYLE_HIDDEN == aStyle)) {    return;  }  PRBool transparent, foreground;  styleData->GetBorderColor(aSide, aColor, transparent, foreground);  if (transparent) {     aColor = 0;  }  else if (foreground) {    aColor = aFrame->GetStyleColor()->mColor;  }}