mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
collapsing border bug fixes
This commit is contained in:
parent
1665254dca
commit
0664302426
@ -146,7 +146,7 @@ NS_METHOD nsTableCellFrame::Paint(nsIPresContext& aPresContext,
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("-- Paint cell (%d %d)\n", GetRowIndex(), GetColIndex());
|
||||
//printf("-- Paint cell (%d %d)\n", GetRowIndex(), GetColIndex());
|
||||
nsCSSRendering::PaintBorderEdges(aPresContext, aRenderingContext, this,
|
||||
aDirtyRect, rect, &mBorderEdges, skipSides);
|
||||
}
|
||||
@ -191,7 +191,7 @@ void nsTableCellFrame::SetBorderEdge(PRUint8 aSide,
|
||||
{
|
||||
PRInt32 colIndex = aColIndex-GetColIndex();
|
||||
border = (nsBorderEdge *)(mBorderEdges.mEdges[aSide].ElementAt(colIndex));
|
||||
mBorderEdges.mMaxBorderWidth.top = PR_MAX(aBorder->mWidth, mBorderEdges.mMaxBorderWidth.top);
|
||||
mBorderEdges.mMaxBorderWidth.top = PR_MAX(aBorder->mWidth+aOddAmountToAdd, mBorderEdges.mMaxBorderWidth.top);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ void nsTableCellFrame::SetBorderEdge(PRUint8 aSide,
|
||||
{
|
||||
PRInt32 colIndex = aColIndex-GetColIndex();
|
||||
border = (nsBorderEdge *)(mBorderEdges.mEdges[aSide].ElementAt(colIndex));
|
||||
mBorderEdges.mMaxBorderWidth.bottom = PR_MAX(aBorder->mWidth, mBorderEdges.mMaxBorderWidth.bottom);
|
||||
mBorderEdges.mMaxBorderWidth.bottom = PR_MAX(aBorder->mWidth+aOddAmountToAdd, mBorderEdges.mMaxBorderWidth.bottom);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ void nsTableCellFrame::SetBorderEdge(PRUint8 aSide,
|
||||
{
|
||||
PRInt32 rowIndex = aRowIndex-GetRowIndex();
|
||||
border = (nsBorderEdge *)(mBorderEdges.mEdges[aSide].ElementAt(rowIndex));
|
||||
mBorderEdges.mMaxBorderWidth.left = PR_MAX(aBorder->mWidth, mBorderEdges.mMaxBorderWidth.left);
|
||||
mBorderEdges.mMaxBorderWidth.left = PR_MAX(aBorder->mWidth+aOddAmountToAdd, mBorderEdges.mMaxBorderWidth.left);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ void nsTableCellFrame::SetBorderEdge(PRUint8 aSide,
|
||||
{
|
||||
PRInt32 rowIndex = aRowIndex-GetRowIndex();
|
||||
border = (nsBorderEdge *)(mBorderEdges.mEdges[aSide].ElementAt(rowIndex));
|
||||
mBorderEdges.mMaxBorderWidth.right = PR_MAX(aBorder->mWidth, mBorderEdges.mMaxBorderWidth.right);
|
||||
mBorderEdges.mMaxBorderWidth.right = PR_MAX(aBorder->mWidth+aOddAmountToAdd, mBorderEdges.mMaxBorderWidth.right);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1507,7 +1507,6 @@ void nsTableFrame::ComputeRightBorderForEdgeAt(nsIPresContext& aPresContext,
|
||||
{
|
||||
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));
|
||||
@ -1724,7 +1723,6 @@ void nsTableFrame::ComputeBottomBorderForEdgeAt(nsIPresContext& aPresContext,
|
||||
{
|
||||
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));
|
||||
@ -2231,7 +2229,7 @@ NS_METHOD nsTableFrame::Paint(nsIPresContext& aPresContext,
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("paint table frame\n");
|
||||
//printf("paint table frame\n");
|
||||
nsCSSRendering::PaintBorderEdges(aPresContext, aRenderingContext, this,
|
||||
aDirtyRect, rect, &mBorderEdges, skipSides);
|
||||
}
|
||||
@ -4484,8 +4482,6 @@ void nsTableFrame::GetTableBorderAt(nsMargin &aBorder, PRInt32 aRowIndex, PRInt3
|
||||
aBorder.top = border->mWidth;
|
||||
border = (nsBorderEdge *)(mBorderEdges.mEdges[NS_SIDE_TOP].ElementAt(aColIndex));
|
||||
aBorder.bottom = border->mWidth;
|
||||
printf("GetTableBorder returning left=%d right=%d top=%d bottom=%d\n",
|
||||
aBorder.left, aBorder.right, aBorder.top, aBorder.bottom);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -146,7 +146,7 @@ NS_METHOD nsTableCellFrame::Paint(nsIPresContext& aPresContext,
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("-- Paint cell (%d %d)\n", GetRowIndex(), GetColIndex());
|
||||
//printf("-- Paint cell (%d %d)\n", GetRowIndex(), GetColIndex());
|
||||
nsCSSRendering::PaintBorderEdges(aPresContext, aRenderingContext, this,
|
||||
aDirtyRect, rect, &mBorderEdges, skipSides);
|
||||
}
|
||||
@ -191,7 +191,7 @@ void nsTableCellFrame::SetBorderEdge(PRUint8 aSide,
|
||||
{
|
||||
PRInt32 colIndex = aColIndex-GetColIndex();
|
||||
border = (nsBorderEdge *)(mBorderEdges.mEdges[aSide].ElementAt(colIndex));
|
||||
mBorderEdges.mMaxBorderWidth.top = PR_MAX(aBorder->mWidth, mBorderEdges.mMaxBorderWidth.top);
|
||||
mBorderEdges.mMaxBorderWidth.top = PR_MAX(aBorder->mWidth+aOddAmountToAdd, mBorderEdges.mMaxBorderWidth.top);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ void nsTableCellFrame::SetBorderEdge(PRUint8 aSide,
|
||||
{
|
||||
PRInt32 colIndex = aColIndex-GetColIndex();
|
||||
border = (nsBorderEdge *)(mBorderEdges.mEdges[aSide].ElementAt(colIndex));
|
||||
mBorderEdges.mMaxBorderWidth.bottom = PR_MAX(aBorder->mWidth, mBorderEdges.mMaxBorderWidth.bottom);
|
||||
mBorderEdges.mMaxBorderWidth.bottom = PR_MAX(aBorder->mWidth+aOddAmountToAdd, mBorderEdges.mMaxBorderWidth.bottom);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ void nsTableCellFrame::SetBorderEdge(PRUint8 aSide,
|
||||
{
|
||||
PRInt32 rowIndex = aRowIndex-GetRowIndex();
|
||||
border = (nsBorderEdge *)(mBorderEdges.mEdges[aSide].ElementAt(rowIndex));
|
||||
mBorderEdges.mMaxBorderWidth.left = PR_MAX(aBorder->mWidth, mBorderEdges.mMaxBorderWidth.left);
|
||||
mBorderEdges.mMaxBorderWidth.left = PR_MAX(aBorder->mWidth+aOddAmountToAdd, mBorderEdges.mMaxBorderWidth.left);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ void nsTableCellFrame::SetBorderEdge(PRUint8 aSide,
|
||||
{
|
||||
PRInt32 rowIndex = aRowIndex-GetRowIndex();
|
||||
border = (nsBorderEdge *)(mBorderEdges.mEdges[aSide].ElementAt(rowIndex));
|
||||
mBorderEdges.mMaxBorderWidth.right = PR_MAX(aBorder->mWidth, mBorderEdges.mMaxBorderWidth.right);
|
||||
mBorderEdges.mMaxBorderWidth.right = PR_MAX(aBorder->mWidth+aOddAmountToAdd, mBorderEdges.mMaxBorderWidth.right);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1507,7 +1507,6 @@ void nsTableFrame::ComputeRightBorderForEdgeAt(nsIPresContext& aPresContext,
|
||||
{
|
||||
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));
|
||||
@ -1724,7 +1723,6 @@ void nsTableFrame::ComputeBottomBorderForEdgeAt(nsIPresContext& aPresContext,
|
||||
{
|
||||
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));
|
||||
@ -2231,7 +2229,7 @@ NS_METHOD nsTableFrame::Paint(nsIPresContext& aPresContext,
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("paint table frame\n");
|
||||
//printf("paint table frame\n");
|
||||
nsCSSRendering::PaintBorderEdges(aPresContext, aRenderingContext, this,
|
||||
aDirtyRect, rect, &mBorderEdges, skipSides);
|
||||
}
|
||||
@ -4484,8 +4482,6 @@ void nsTableFrame::GetTableBorderAt(nsMargin &aBorder, PRInt32 aRowIndex, PRInt3
|
||||
aBorder.top = border->mWidth;
|
||||
border = (nsBorderEdge *)(mBorderEdges.mEdges[NS_SIDE_TOP].ElementAt(aColIndex));
|
||||
aBorder.bottom = border->mWidth;
|
||||
printf("GetTableBorder returning left=%d right=%d top=%d bottom=%d\n",
|
||||
aBorder.left, aBorder.right, aBorder.top, aBorder.bottom);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user