bug 707622 - rows without originating cells are suppressed at the table bottom r=mats
authorBernd <bmlk@gmx.de>
Wed, 07 Dec 2011 20:38:25 +0100
changeset 82185 f163017ba99a560924f4efec2b1502815b9a9015
parent 82184 c170c678c9ac660a6af94558b88dedf2c6b79f9c
child 82186 ba3695fe861c0b2322c83bfee8b555ff28f25bd2
push id3896
push userbmlk@gmx.de
push dateWed, 07 Dec 2011 19:40:25 +0000
treeherdermozilla-inbound@f163017ba99a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs707622
milestone11.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 707622 - rows without originating cells are suppressed at the table bottom r=mats
layout/tables/crashtests/707622-1.html
layout/tables/crashtests/crashtests.list
layout/tables/nsTableCellFrame.cpp
new file mode 100644
--- /dev/null
+++ b/layout/tables/crashtests/707622-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body onload="document.getElementsByTagName('td')[0].style.border = '2px solid green';">
+<table rules="all"><tr><td rowspan="2"></td></tr></table>
+</body>
+</html>
--- a/layout/tables/crashtests/crashtests.list
+++ b/layout/tables/crashtests/crashtests.list
@@ -115,10 +115,11 @@ load 576890-1.html
 load 576890-2.html
 load 576890-3.html
 load 580481-1.xhtml
 asserts(0-3) load 595758-1.xhtml # Bug 453871
 load 595758-2.xhtml
 load 678447-1.html
 load 691824-1.xhtml
 load 695430-1.html
+load 707622-1.html
 load 705996-1.html
 load 705996-2.html
--- a/layout/tables/nsTableCellFrame.cpp
+++ b/layout/tables/nsTableCellFrame.cpp
@@ -250,17 +250,20 @@ nsTableCellFrame::DidSetStyleContext(nsS
 
   nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
 
   if (tableFrame->IsBorderCollapse() &&
       tableFrame->BCRecalcNeeded(aOldStyleContext, GetStyleContext())) {
     PRInt32 colIndex, rowIndex;
     GetColIndex(colIndex);
     GetRowIndex(rowIndex);
-    nsRect damageArea(colIndex, rowIndex, GetColSpan(), GetRowSpan());
+    // row span needs to be clamped as we do not create rows in the cellmap
+    // which do not have cells originating in them
+    nsRect damageArea(colIndex, rowIndex, GetColSpan(), NS_MIN(GetRowSpan(),
+                      tableFrame->GetRowCount() - rowIndex));
     tableFrame->AddBCDamageArea(damageArea);
   }
 }
 
 
 NS_IMETHODIMP
 nsTableCellFrame::AppendFrames(ChildListID     aListID,
                                nsFrameList&    aFrameList)