Bug 1405929 - Part 1 : Make sure that we join two BEnd borders when they are on the same rowIndex. r?dbaron
MozReview-Commit-ID: J9q8sUX2MPB
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -6453,17 +6453,19 @@ nsTableFrame::CalcBCBorders()
gotRowBorder = true;
}
}
// see if the cell to the iEnd side had a rowspan and its bEnd-iStart border
// needs be joined with this one's bEnd
// if there is a cell to the iEnd and the cell to iEnd side was a rowspan
if ((info.mNumTableCols != info.GetCellEndColIndex() + 1) &&
- (lastBEndBorders[info.GetCellEndColIndex() + 1].rowSpan > 1)) {
+ (lastBEndBorders[info.GetCellEndColIndex() + 1].rowSpan > 1) &&
+ (lastBEndBorders[info.GetCellEndColIndex() + 1].rowIndex ==
+ info.GetCellEndRowIndex() + 1)) {
BCCornerInfo& corner = bEndCorners[info.GetCellEndColIndex() + 1];
if (!IsBlock(LogicalSide(corner.ownerSide))) {
// not a block-dir owner
BCCellBorder& thisBorder = lastBEndBorder;
BCCellBorder& nextBorder = lastBEndBorders[info.mColIndex + 1];
if ((thisBorder.color == nextBorder.color) &&
(thisBorder.width == nextBorder.width) &&
(thisBorder.style == nextBorder.style)) {