Bug 1389295 - Confine BCDamageArea while appending cells to within the table area and remove assert for test 460637-2.xhtml r=mats
authorNeerja Pancholi <npancholi@mozilla.com>
Thu, 24 Aug 2017 17:39:44 -0700
changeset 428443 b3bd0baa4b337513b49e66eb46f103bc267e763c
parent 428442 c3ce49cb24a6568fb6a211c671ede86ea901506d
child 428444 ed6a08331f08b50090f003a6d986d0fce0204f4a
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1389295, 460637
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1389295 - Confine BCDamageArea while appending cells to within the table area and remove assert for test 460637-2.xhtml r=mats MozReview-Commit-ID: 6lJahcAmlIN
layout/tables/crashtests/crashtests.list
layout/tables/nsCellMap.cpp
--- a/layout/tables/crashtests/crashtests.list
+++ b/layout/tables/crashtests/crashtests.list
@@ -112,17 +112,17 @@ load 444431-1.html
 load 444702-1.html
 load 448988-1.xhtml
 load 450311-1.html
 load 451170.html
 load 451355-1.html
 load 456041.html
 load 457115.html
 load 460637-1.xhtml
-asserts(1) load 460637-2.xhtml # bug 1389295
+load 460637-2.xhtml
 load 460637-3.xhtml
 load 462849.xhtml
 load 467141-1.html
 load 488388-1.html
 load 501870-1.html
 load 509562-1.xhtml
 load 512749-1.html
 load 513732-1.html
--- a/layout/tables/nsCellMap.cpp
+++ b/layout/tables/nsCellMap.cpp
@@ -1486,18 +1486,18 @@ nsCellMap::AppendCell(nsTableCellMap&   
     if (!origData) ABORT1(origData);
     SetDataAt(aMap, *origData, aRowIndex, startColIndex);
   }
 
   if (aRebuildIfNecessary) {
     //the caller depends on the damageArea
     // The special case for zeroRowSpan is to adjust for the '2' in
     // GetRowSpanForNewCell.
-    uint32_t height = zeroRowSpan ? endRowIndex - aRowIndex  :
-                                    1 + endRowIndex - aRowIndex;
+    uint32_t height = std::min(zeroRowSpan ? rowSpan - 1 : rowSpan,
+                               GetRowCount() - aRowIndex);
     SetDamageArea(startColIndex, aRgFirstRowIndex + aRowIndex,
                   1 + endColIndex - startColIndex, height, aDamageArea);
   }
 
   if (!aCellFrame) {
     return origData;
   }