Bug 1405929 - Part 1 : Make sure that we join two BEnd borders when they are on the same rowIndex. r?dbaron draft
authorYa-Chieh Wu <ywu@mozilla.com>
Fri, 24 Nov 2017 14:44:01 +0800
changeset 703038 3fe309da7f7ffabc06f8363c57c2a8a26a43fc50
parent 701610 b96f009478987d44a68a8d7cad40c6a3d6626235
child 703039 10d8fa03a4318b37bb5612d555444500920e5dd8
push id90677
push userbmo:ywu@mozilla.com
push dateFri, 24 Nov 2017 08:07:24 +0000
reviewersdbaron
bugs1405929
milestone59.0a1
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
layout/tables/nsTableFrame.cpp
--- 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)) {