collapsing borders with odd width have correct width now

git-svn-id: svn://10.0.0.236/trunk@17012 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
buster%netscape.com
1998-12-30 22:40:36 +00:00
parent 92257be8b3
commit 9864b12d26
2 changed files with 28 additions and 28 deletions

View File

@@ -1503,6 +1503,11 @@ void nsTableFrame::ComputeRightBorderForEdgeAt(nsIPresContext& aPresContext,
widthToAdd = NSToCoordCeil(p2t);
border.mWidth *= NSToCoordCeil(p2t);
border.mLength = rowRect.height;
if (nsnull!=cellFrame)
{
cellFrame->SetBorderEdge(NS_SIDE_RIGHT, aRowIndex, aColIndex, &border, widthToAdd);
}
border.mWidth += widthToAdd; // right edge of this cell get's odd pixel
if (nsnull==rightNeighborFrame)
{
nsBorderEdge * tableBorder = (nsBorderEdge *)(mBorderEdges.mEdges[NS_SIDE_RIGHT].ElementAt(aRowIndex));
@@ -1515,13 +1520,8 @@ void nsTableFrame::ComputeRightBorderForEdgeAt(nsIPresContext& aPresContext,
}
else
{
border.mWidth += widthToAdd; // right edge of this cell get's odd pixel
rightNeighborFrame->SetBorderEdge(NS_SIDE_LEFT, aRowIndex, aColIndex, &border, 0);
}
if (nsnull!=cellFrame)
{
cellFrame->SetBorderEdge(NS_SIDE_RIGHT, aRowIndex, aColIndex, &border, widthToAdd);
}
}
void nsTableFrame::ComputeTopBorderForEdgeAt(nsIPresContext& aPresContext,
@@ -1720,6 +1720,11 @@ void nsTableFrame::ComputeBottomBorderForEdgeAt(nsIPresContext& aPresContext,
widthToAdd = NSToCoordCeil(p2t);
border.mWidth *= NSToCoordCeil(p2t);
border.mLength = GetColumnWidth(aColIndex);
if (nsnull!=cellFrame)
{
cellFrame->SetBorderEdge(NS_SIDE_BOTTOM, aRowIndex, aColIndex, &border, widthToAdd);
}
border.mWidth += widthToAdd; // bottom edge of this cell get's odd pixel
if (nsnull==bottomNeighborFrame)
{
nsBorderEdge * tableBorder = (nsBorderEdge *)(mBorderEdges.mEdges[NS_SIDE_BOTTOM].ElementAt(aColIndex));
@@ -1741,13 +1746,8 @@ void nsTableFrame::ComputeBottomBorderForEdgeAt(nsIPresContext& aPresContext,
}
else
{
border.mWidth += widthToAdd; // bottom edge of this cell get's odd pixel
bottomNeighborFrame->SetBorderEdge(NS_SIDE_TOP, aRowIndex, aColIndex, &border, 0);
}
if (nsnull!=cellFrame)
{
cellFrame->SetBorderEdge(NS_SIDE_BOTTOM, aRowIndex, aColIndex, &border, widthToAdd);
}
}
nscoord nsTableFrame::GetWidthForSide(const nsMargin &aBorder, PRUint8 aSide)
@@ -4330,10 +4330,10 @@ void nsTableFrame::MapHTMLBorderStyle(nsStyleSpacing& aSpacingStyle, nscoord aBo
aSpacingStyle.mBorder.SetBottom(width);
aSpacingStyle.mBorder.SetRight(width);
aSpacingStyle.SetBorderStyle(NS_SIDE_TOP, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_LEFT, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_BOTTOM, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_RIGHT, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_TOP, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_LEFT, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_BOTTOM, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_RIGHT, NS_STYLE_BORDER_STYLE_OUTSET);
nsIStyleContext* styleContext = mStyleContext;
const nsStyleColor* colorData = (const nsStyleColor*)

View File

@@ -1503,6 +1503,11 @@ void nsTableFrame::ComputeRightBorderForEdgeAt(nsIPresContext& aPresContext,
widthToAdd = NSToCoordCeil(p2t);
border.mWidth *= NSToCoordCeil(p2t);
border.mLength = rowRect.height;
if (nsnull!=cellFrame)
{
cellFrame->SetBorderEdge(NS_SIDE_RIGHT, aRowIndex, aColIndex, &border, widthToAdd);
}
border.mWidth += widthToAdd; // right edge of this cell get's odd pixel
if (nsnull==rightNeighborFrame)
{
nsBorderEdge * tableBorder = (nsBorderEdge *)(mBorderEdges.mEdges[NS_SIDE_RIGHT].ElementAt(aRowIndex));
@@ -1515,13 +1520,8 @@ void nsTableFrame::ComputeRightBorderForEdgeAt(nsIPresContext& aPresContext,
}
else
{
border.mWidth += widthToAdd; // right edge of this cell get's odd pixel
rightNeighborFrame->SetBorderEdge(NS_SIDE_LEFT, aRowIndex, aColIndex, &border, 0);
}
if (nsnull!=cellFrame)
{
cellFrame->SetBorderEdge(NS_SIDE_RIGHT, aRowIndex, aColIndex, &border, widthToAdd);
}
}
void nsTableFrame::ComputeTopBorderForEdgeAt(nsIPresContext& aPresContext,
@@ -1720,6 +1720,11 @@ void nsTableFrame::ComputeBottomBorderForEdgeAt(nsIPresContext& aPresContext,
widthToAdd = NSToCoordCeil(p2t);
border.mWidth *= NSToCoordCeil(p2t);
border.mLength = GetColumnWidth(aColIndex);
if (nsnull!=cellFrame)
{
cellFrame->SetBorderEdge(NS_SIDE_BOTTOM, aRowIndex, aColIndex, &border, widthToAdd);
}
border.mWidth += widthToAdd; // bottom edge of this cell get's odd pixel
if (nsnull==bottomNeighborFrame)
{
nsBorderEdge * tableBorder = (nsBorderEdge *)(mBorderEdges.mEdges[NS_SIDE_BOTTOM].ElementAt(aColIndex));
@@ -1741,13 +1746,8 @@ void nsTableFrame::ComputeBottomBorderForEdgeAt(nsIPresContext& aPresContext,
}
else
{
border.mWidth += widthToAdd; // bottom edge of this cell get's odd pixel
bottomNeighborFrame->SetBorderEdge(NS_SIDE_TOP, aRowIndex, aColIndex, &border, 0);
}
if (nsnull!=cellFrame)
{
cellFrame->SetBorderEdge(NS_SIDE_BOTTOM, aRowIndex, aColIndex, &border, widthToAdd);
}
}
nscoord nsTableFrame::GetWidthForSide(const nsMargin &aBorder, PRUint8 aSide)
@@ -4330,10 +4330,10 @@ void nsTableFrame::MapHTMLBorderStyle(nsStyleSpacing& aSpacingStyle, nscoord aBo
aSpacingStyle.mBorder.SetBottom(width);
aSpacingStyle.mBorder.SetRight(width);
aSpacingStyle.SetBorderStyle(NS_SIDE_TOP, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_LEFT, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_BOTTOM, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_RIGHT, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_TOP, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_LEFT, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_BOTTOM, NS_STYLE_BORDER_STYLE_OUTSET);
aSpacingStyle.SetBorderStyle(NS_SIDE_RIGHT, NS_STYLE_BORDER_STYLE_OUTSET);
nsIStyleContext* styleContext = mStyleContext;
const nsStyleColor* colorData = (const nsStyleColor*)