Skip to content
Browse files

bug 711359 - mark all subsequent rows as damaged r=mats

  • Loading branch information...
1 parent d911f27 commit 6bcc8b1bb56c9afed0237435ba47355aee5ce47f Bernd committed
View
13 layout/reftests/bugs/711359-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<body>
+ <table style="border-collapse: collapse;" border="1">
+ <tbody id="reference">
+ <tr><td>&nbsp;</td></tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr><td>&nbsp;</td></tr>
+ </tbody>
+ </table>
+</body>
+</html>
View
32 layout/reftests/bugs/711359-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <script>
+ var lastLang = "";
+ function LangSelect(aLang) {
+ var tbody = document.getElementById("l10ntbody");
+ var child = tbody.firstChild;
+ while (child) {
+ if (child.nodeType == Node.ELEMENT_NODE) {
+ if (aLang == "*" || aLang == child.getAttribute("language"))
+ child.removeAttribute("style");
+ else
+ child.setAttribute("style", "display: none");
+ }
+ child = child.nextSibling;
+ }
+ }
+</script>
+</head>
+
+<body onload="LangSelect('cs');">
+ <table style="border-collapse: collapse;" border="1">
+ <tbody id="l10ntbody">
+ <tr style="display: none;" language="cs"><td>&nbsp;</td></tr>
+ <tr style="display: none;" language="cs"><td>&nbsp;</td></tr>
+ <tr style="display: none;" language="cs"><td>&nbsp;</td></tr>
+ </tbody>
+ </table>
+</body>
+</html>
View
31 layout/reftests/bugs/712849-1-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>testcase</title>
+<style>
+.tt {
+ border-collapse: collapse;
+}
+.nix {
+ display: none;
+}
+.ref {
+ border: solid 3px darkred;
+}
+
+td {
+ width: 20px;
+ height: 20px;
+}
+
+</style>
+</head>
+<body>
+ <table class="tt">
+ <tr id="1"><td >&nbsp;</td></tr>
+ <tr id="2" class="nix"><td >&nbsp;</td></tr>
+ <tr id="3" class="ref"><td >&nbsp;</td></tr>
+ <tr><td>&nbsp;</td></tr>
+ </table>
+</body>
+</html>
View
39 layout/reftests/bugs/712849-1.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>testcase</title>
+<style>
+.tt {
+ border-collapse: collapse;
+}
+.nix {
+ display: none;
+}
+.ref {
+ border: solid 3px darkred;
+}
+
+td {
+ width: 20px;
+ height: 20px;
+}
+
+</style>
+<script>
+
+function test ()
+{
+ document.getElementById ("2").className = "nix";
+ document.getElementById ("3").className = "ref";
+}
+</script>
+</head>
+<body onload="test()">
+ <table class="tt">
+ <tr id="1"><td >&nbsp;</td></tr>
+ <tr id="2"><td >&nbsp;</td></tr>
+ <tr id="3"><td >&nbsp;</td></tr>
+ <tr><td>&nbsp;</td></tr>
+ </table>
+</body>
+</html>
View
2 layout/reftests/bugs/reftest.list
@@ -1677,3 +1677,5 @@ fails-if(layersGPUAccelerated&&cocoaWidget) == 654950-1.html 654950-1-ref.html #
needs-focus == 703186-1.html 703186-1-ref.html
needs-focus == 703186-2.html 703186-2-ref.html
needs-focus != 703186-1.html 703186-2.html
+== 711359-1.html 711359-1-ref.html
+== 712849-1.html 712849-1-ref.html
View
14 layout/tables/nsCellMap.cpp
@@ -1860,8 +1860,11 @@ nsCellMap::ExpandWithRows(nsTableCellMap& aMap,
}
newRowIndex++;
}
- SetDamageArea(0, aRgFirstRowIndex + startRowIndex, aMap.GetColCount(),
- 1 + endRowIndex - startRowIndex, aDamageArea);
+ // mark all following rows damaged, they might contain a previously set
+ // damage area which we can not shift.
+ PRInt32 firstDamagedRow = aRgFirstRowIndex + startRowIndex;
+ SetDamageArea(0, firstDamagedRow, aMap.GetColCount(),
+ aMap.GetRowCount() - firstDamagedRow, aDamageArea);
}
void nsCellMap::ExpandWithCells(nsTableCellMap& aMap,
@@ -2028,8 +2031,11 @@ void nsCellMap::ShrinkWithoutRows(nsTableCellMap& aMap,
mContentRowCount--;
}
aMap.RemoveColsAtEnd();
- SetDamageArea(0, aRgFirstRowIndex + aStartRowIndex, aMap.GetColCount(), 0,
- aDamageArea);
+ // mark all following rows damaged, they might contain a previously set
+ // damage area which we can not shift.
+ PRInt32 firstDamagedRow = aRgFirstRowIndex + aStartRowIndex;
+ SetDamageArea(0, firstDamagedRow, aMap.GetColCount(),
+ aMap.GetRowCount() - firstDamagedRow, aDamageArea);
}
PRInt32 nsCellMap::GetColSpanForNewCell(nsTableCellFrame& aCellFrameToAdd,

0 comments on commit 6bcc8b1

Please sign in to comment.
Something went wrong with that request. Please try again.