nsMargin* nsBCTableCellFrame::GetBorderWidth(float aPixelsToTwips, nsMargin& aBorder) const { aBorder.top = BC_BORDER_BOTTOM_HALF_COORD(aPixelsToTwips, mTopBorder); aBorder.right = BC_BORDER_LEFT_HALF_COORD(aPixelsToTwips, mRightBorder); aBorder.bottom = BC_BORDER_TOP_HALF_COORD(aPixelsToTwips, mBottomBorder); aBorder.left = BC_BORDER_RIGHT_HALF_COORD(aPixelsToTwips, mLeftBorder); return &aBorder; }
void nsTableColGroupFrame::GetContinuousBCBorderWidth(nsMargin& aBorder) { PRInt32 aPixelsToTwips = nsPresContext::AppUnitsPerCSSPixel(); nsTableFrame* table = nsTableFrame::GetTableFrame(this); nsTableColFrame* col = table->GetColFrame(mStartColIndex + mColCount - 1); col->GetContinuousBCBorderWidth(aBorder); aBorder.top = BC_BORDER_BOTTOM_HALF_COORD(aPixelsToTwips, mTopContBorderWidth); aBorder.bottom = BC_BORDER_TOP_HALF_COORD(aPixelsToTwips, mBottomContBorderWidth); }
/* virtual */ void nsBCTableCellFrame::GetSelfOverflow(nsRect& aOverflowArea) { nsMargin halfBorder; float p2t = GetPresContext()->PixelsToTwips(); halfBorder.top = BC_BORDER_TOP_HALF_COORD(p2t, mTopBorder); halfBorder.right = BC_BORDER_RIGHT_HALF_COORD(p2t, mRightBorder); halfBorder.bottom = BC_BORDER_BOTTOM_HALF_COORD(p2t, mBottomBorder); halfBorder.left = BC_BORDER_LEFT_HALF_COORD(p2t, mLeftBorder); nsRect overflow(nsPoint(0,0), GetSize()); overflow.Inflate(halfBorder); aOverflowArea = overflow; }