зеркало из https://github.com/mozilla/pjs.git
border collapse - lookup the correct border owner style, bug 196133, r=jkeiser sr=roc+moz
This commit is contained in:
Родитель
d325dff0e8
Коммит
f96d268197
|
@ -6503,16 +6503,18 @@ struct BCVerticalSeg
|
||||||
nsTableColFrame* col;
|
nsTableColFrame* col;
|
||||||
PRInt32 colWidth;
|
PRInt32 colWidth;
|
||||||
};
|
};
|
||||||
PRInt32 colX;
|
PRInt32 colX;
|
||||||
nsTableCellFrame* ajaCell;
|
nsTableCellFrame* ajaCell;
|
||||||
nsTableCellFrame* firstCell; // cell at the start of the segment
|
nsTableCellFrame* firstCell; // cell at the start of the segment
|
||||||
nsTableCellFrame* lastCell; // cell at the current end of the segment
|
nsTableRowGroupFrame* firstRowGroup; // row group at the start of the segment
|
||||||
PRInt32 segY;
|
nsTableRowFrame* firstRow; // row at the start of the segment
|
||||||
PRInt32 segHeight;
|
nsTableCellFrame* lastCell; // cell at the current end of the segment
|
||||||
PRInt16 segWidth; // width in pixels
|
PRInt32 segY;
|
||||||
PRUint8 owner;
|
PRInt32 segHeight;
|
||||||
PRUint8 bevelSide;
|
PRInt16 segWidth; // width in pixels
|
||||||
PRUint16 bevelOffset;
|
PRUint8 owner;
|
||||||
|
PRUint8 bevelSide;
|
||||||
|
PRUint16 bevelOffset;
|
||||||
};
|
};
|
||||||
|
|
||||||
BCVerticalSeg::BCVerticalSeg()
|
BCVerticalSeg::BCVerticalSeg()
|
||||||
|
@ -6540,13 +6542,15 @@ BCVerticalSeg::Start(BCMapBorderIterator& aIter,
|
||||||
nscoord offset = CalcVerCornerOffset(ownerSide, cornerSubWidth, maxHorSegHeight,
|
nscoord offset = CalcVerCornerOffset(ownerSide, cornerSubWidth, maxHorSegHeight,
|
||||||
PR_TRUE, topBevel, aPixelsToTwips);
|
PR_TRUE, topBevel, aPixelsToTwips);
|
||||||
|
|
||||||
bevelOffset = (topBevel) ? maxHorSegHeight : 0;
|
bevelOffset = (topBevel) ? maxHorSegHeight : 0;
|
||||||
bevelSide = (aHorSegHeight > 0) ? NS_SIDE_RIGHT : NS_SIDE_LEFT;
|
bevelSide = (aHorSegHeight > 0) ? NS_SIDE_RIGHT : NS_SIDE_LEFT;
|
||||||
segY += offset;
|
segY += offset;
|
||||||
segHeight = -offset;
|
segHeight = -offset;
|
||||||
segWidth = aVerSegWidth;
|
segWidth = aVerSegWidth;
|
||||||
owner = aBorderOwner;
|
owner = aBorderOwner;
|
||||||
firstCell = aIter.cell;
|
firstCell = aIter.cell;
|
||||||
|
firstRowGroup = aIter.rg;
|
||||||
|
firstRow = aIter.row;
|
||||||
if (xAdj > 0) {
|
if (xAdj > 0) {
|
||||||
ajaCell = aVerInfoArray[xAdj - 1].lastCell;
|
ajaCell = aVerInfoArray[xAdj - 1].lastCell;
|
||||||
}
|
}
|
||||||
|
@ -6768,9 +6772,11 @@ nsTableFrame::PaintBCBorders(nsIPresContext* aPresContext,
|
||||||
if (info.segWidth > 0) {
|
if (info.segWidth > 0) {
|
||||||
// get the border style, color and paint the segment
|
// get the border style, color and paint the segment
|
||||||
PRUint8 side = (iter.IsRightMost()) ? NS_SIDE_RIGHT : NS_SIDE_LEFT;
|
PRUint8 side = (iter.IsRightMost()) ? NS_SIDE_RIGHT : NS_SIDE_LEFT;
|
||||||
nsTableColGroupFrame* cg = nsnull;
|
nsTableColGroupFrame* cg = nsnull;
|
||||||
nsTableColFrame* col = info.col; if (!col) ABORT0();
|
nsTableRowFrame* row = info.firstRow;
|
||||||
nsTableCellFrame* cell = info.firstCell;
|
nsTableRowGroupFrame* rowGroup = info.firstRowGroup;
|
||||||
|
nsTableColFrame* col = info.col; if (!col) ABORT0();
|
||||||
|
nsTableCellFrame* cell = info.firstCell;
|
||||||
PRUint8 style = NS_STYLE_BORDER_STYLE_SOLID;
|
PRUint8 style = NS_STYLE_BORDER_STYLE_SOLID;
|
||||||
nscolor color = 0xFFFFFFFF;
|
nscolor color = 0xFFFFFFFF;
|
||||||
PRBool ignoreIfRules = (iter.IsRightMostTable() || iter.IsLeftMostTable());
|
PRBool ignoreIfRules = (iter.IsRightMostTable() || iter.IsLeftMostTable());
|
||||||
|
@ -6806,16 +6812,16 @@ nsTableFrame::PaintBCBorders(nsIPresContext* aPresContext,
|
||||||
NS_ASSERTION(PR_FALSE, "program error"); // and fall through
|
NS_ASSERTION(PR_FALSE, "program error"); // and fall through
|
||||||
case eRowGroupOwner:
|
case eRowGroupOwner:
|
||||||
NS_ASSERTION(iter.IsLeftMostTable() || iter.IsRightMostTable(), "program error");
|
NS_ASSERTION(iter.IsLeftMostTable() || iter.IsRightMostTable(), "program error");
|
||||||
if (iter.rg) {
|
if (rowGroup) {
|
||||||
::GetStyleInfo(*iter.rg, side, style, color, ignoreIfRules);
|
::GetStyleInfo(*rowGroup, side, style, color, ignoreIfRules);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case eAjaRowOwner:
|
case eAjaRowOwner:
|
||||||
NS_ASSERTION(PR_FALSE, "program error"); // and fall through
|
NS_ASSERTION(PR_FALSE, "program error"); // and fall through
|
||||||
case eRowOwner:
|
case eRowOwner:
|
||||||
NS_ASSERTION(iter.IsLeftMostTable() || iter.IsRightMostTable(), "program error");
|
NS_ASSERTION(iter.IsLeftMostTable() || iter.IsRightMostTable(), "program error");
|
||||||
if (iter.row) {
|
if (row) {
|
||||||
::GetStyleInfo(*iter.row, side, style, color, ignoreIfRules);
|
::GetStyleInfo(*row, side, style, color, ignoreIfRules);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case eAjaCellOwner:
|
case eAjaCellOwner:
|
||||||
|
|
|
@ -6503,16 +6503,18 @@ struct BCVerticalSeg
|
||||||
nsTableColFrame* col;
|
nsTableColFrame* col;
|
||||||
PRInt32 colWidth;
|
PRInt32 colWidth;
|
||||||
};
|
};
|
||||||
PRInt32 colX;
|
PRInt32 colX;
|
||||||
nsTableCellFrame* ajaCell;
|
nsTableCellFrame* ajaCell;
|
||||||
nsTableCellFrame* firstCell; // cell at the start of the segment
|
nsTableCellFrame* firstCell; // cell at the start of the segment
|
||||||
nsTableCellFrame* lastCell; // cell at the current end of the segment
|
nsTableRowGroupFrame* firstRowGroup; // row group at the start of the segment
|
||||||
PRInt32 segY;
|
nsTableRowFrame* firstRow; // row at the start of the segment
|
||||||
PRInt32 segHeight;
|
nsTableCellFrame* lastCell; // cell at the current end of the segment
|
||||||
PRInt16 segWidth; // width in pixels
|
PRInt32 segY;
|
||||||
PRUint8 owner;
|
PRInt32 segHeight;
|
||||||
PRUint8 bevelSide;
|
PRInt16 segWidth; // width in pixels
|
||||||
PRUint16 bevelOffset;
|
PRUint8 owner;
|
||||||
|
PRUint8 bevelSide;
|
||||||
|
PRUint16 bevelOffset;
|
||||||
};
|
};
|
||||||
|
|
||||||
BCVerticalSeg::BCVerticalSeg()
|
BCVerticalSeg::BCVerticalSeg()
|
||||||
|
@ -6540,13 +6542,15 @@ BCVerticalSeg::Start(BCMapBorderIterator& aIter,
|
||||||
nscoord offset = CalcVerCornerOffset(ownerSide, cornerSubWidth, maxHorSegHeight,
|
nscoord offset = CalcVerCornerOffset(ownerSide, cornerSubWidth, maxHorSegHeight,
|
||||||
PR_TRUE, topBevel, aPixelsToTwips);
|
PR_TRUE, topBevel, aPixelsToTwips);
|
||||||
|
|
||||||
bevelOffset = (topBevel) ? maxHorSegHeight : 0;
|
bevelOffset = (topBevel) ? maxHorSegHeight : 0;
|
||||||
bevelSide = (aHorSegHeight > 0) ? NS_SIDE_RIGHT : NS_SIDE_LEFT;
|
bevelSide = (aHorSegHeight > 0) ? NS_SIDE_RIGHT : NS_SIDE_LEFT;
|
||||||
segY += offset;
|
segY += offset;
|
||||||
segHeight = -offset;
|
segHeight = -offset;
|
||||||
segWidth = aVerSegWidth;
|
segWidth = aVerSegWidth;
|
||||||
owner = aBorderOwner;
|
owner = aBorderOwner;
|
||||||
firstCell = aIter.cell;
|
firstCell = aIter.cell;
|
||||||
|
firstRowGroup = aIter.rg;
|
||||||
|
firstRow = aIter.row;
|
||||||
if (xAdj > 0) {
|
if (xAdj > 0) {
|
||||||
ajaCell = aVerInfoArray[xAdj - 1].lastCell;
|
ajaCell = aVerInfoArray[xAdj - 1].lastCell;
|
||||||
}
|
}
|
||||||
|
@ -6768,9 +6772,11 @@ nsTableFrame::PaintBCBorders(nsIPresContext* aPresContext,
|
||||||
if (info.segWidth > 0) {
|
if (info.segWidth > 0) {
|
||||||
// get the border style, color and paint the segment
|
// get the border style, color and paint the segment
|
||||||
PRUint8 side = (iter.IsRightMost()) ? NS_SIDE_RIGHT : NS_SIDE_LEFT;
|
PRUint8 side = (iter.IsRightMost()) ? NS_SIDE_RIGHT : NS_SIDE_LEFT;
|
||||||
nsTableColGroupFrame* cg = nsnull;
|
nsTableColGroupFrame* cg = nsnull;
|
||||||
nsTableColFrame* col = info.col; if (!col) ABORT0();
|
nsTableRowFrame* row = info.firstRow;
|
||||||
nsTableCellFrame* cell = info.firstCell;
|
nsTableRowGroupFrame* rowGroup = info.firstRowGroup;
|
||||||
|
nsTableColFrame* col = info.col; if (!col) ABORT0();
|
||||||
|
nsTableCellFrame* cell = info.firstCell;
|
||||||
PRUint8 style = NS_STYLE_BORDER_STYLE_SOLID;
|
PRUint8 style = NS_STYLE_BORDER_STYLE_SOLID;
|
||||||
nscolor color = 0xFFFFFFFF;
|
nscolor color = 0xFFFFFFFF;
|
||||||
PRBool ignoreIfRules = (iter.IsRightMostTable() || iter.IsLeftMostTable());
|
PRBool ignoreIfRules = (iter.IsRightMostTable() || iter.IsLeftMostTable());
|
||||||
|
@ -6806,16 +6812,16 @@ nsTableFrame::PaintBCBorders(nsIPresContext* aPresContext,
|
||||||
NS_ASSERTION(PR_FALSE, "program error"); // and fall through
|
NS_ASSERTION(PR_FALSE, "program error"); // and fall through
|
||||||
case eRowGroupOwner:
|
case eRowGroupOwner:
|
||||||
NS_ASSERTION(iter.IsLeftMostTable() || iter.IsRightMostTable(), "program error");
|
NS_ASSERTION(iter.IsLeftMostTable() || iter.IsRightMostTable(), "program error");
|
||||||
if (iter.rg) {
|
if (rowGroup) {
|
||||||
::GetStyleInfo(*iter.rg, side, style, color, ignoreIfRules);
|
::GetStyleInfo(*rowGroup, side, style, color, ignoreIfRules);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case eAjaRowOwner:
|
case eAjaRowOwner:
|
||||||
NS_ASSERTION(PR_FALSE, "program error"); // and fall through
|
NS_ASSERTION(PR_FALSE, "program error"); // and fall through
|
||||||
case eRowOwner:
|
case eRowOwner:
|
||||||
NS_ASSERTION(iter.IsLeftMostTable() || iter.IsRightMostTable(), "program error");
|
NS_ASSERTION(iter.IsLeftMostTable() || iter.IsRightMostTable(), "program error");
|
||||||
if (iter.row) {
|
if (row) {
|
||||||
::GetStyleInfo(*iter.row, side, style, color, ignoreIfRules);
|
::GetStyleInfo(*row, side, style, color, ignoreIfRules);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case eAjaCellOwner:
|
case eAjaCellOwner:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче