[webkit-changes] cvs commit: WebCore/layout-tests/fast/dynamic
014-expected.checksum 014-expected.png 014-expected.txt
014.html 015-expected.checksum 015-expected.png
015-expected.txt 015.html 013-expected.checksum
013-expected.png 013-expected.txt
Vicki
vicki at opensource.apple.com
Wed Sep 21 10:32:44 PDT 2005
vicki 05/09/21 10:32:43
Modified: . ChangeLog
khtml/html html_tableimpl.cpp
layout-tests/fast/dynamic 013-expected.checksum
013-expected.png 013-expected.txt
Added: layout-tests/fast/dynamic 014-expected.checksum
014-expected.png 014-expected.txt 014.html
015-expected.checksum 015-expected.png
015-expected.txt 015.html
Log:
Reviewed by Darin.
- fix these bugs
<rdar://problem/3579812> HTMLTableElement.insertRow(n) inserts row at the beginning of the table (4043)
<rdar://problem/3711188> HTMLTableElement.insertRow() doesn't respect passed index
* khtml/html/html_tableimpl.cpp:
(DOM::HTMLTableElementImpl::insertRow):
if the index is the same as the number of rows in the section, we should append
Update test results for /fast/dynamic/013.html. In the old version the the rows
and cells were children of the first table section, a tfoot. They are now children
of the second table section, a tbody. Our rendering now matches Gecko and Win IE
(according to yusufg on #webkit, comparing with 013-expected.png) for this case.
* layout-tests/fast/dynamic/013-expected.checksum:
* layout-tests/fast/dynamic/013-expected.png:
* layout-tests/fast/dynamic/013-expected.txt:
Test cases added:
* layout-tests/fast/dynamic/014-expected.checksum: Added.
* layout-tests/fast/dynamic/014-expected.png: Added.
* layout-tests/fast/dynamic/014-expected.txt: Added.
* layout-tests/fast/dynamic/014.html: Added.
* layout-tests/fast/dynamic/015-expected.checksum: Added.
* layout-tests/fast/dynamic/015-expected.png: Added.
* layout-tests/fast/dynamic/015-expected.txt: Added.
* layout-tests/fast/dynamic/015.html: Added.
Revision Changes Path
1.144 +32 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -r1.143 -r1.144
--- ChangeLog 21 Sep 2005 00:24:12 -0000 1.143
+++ ChangeLog 21 Sep 2005 17:32:37 -0000 1.144
@@ -1,3 +1,35 @@
+2005-09-21 Vicki Murley <vicki at apple.com>
+
+ Reviewed by Darin.
+
+ - fix these bugs
+ <rdar://problem/3579812> HTMLTableElement.insertRow(n) inserts row at the beginning of the table (4043)
+ <rdar://problem/3711188> HTMLTableElement.insertRow() doesn't respect passed index
+
+ * khtml/html/html_tableimpl.cpp:
+ (DOM::HTMLTableElementImpl::insertRow):
+ if the index is the same as the number of rows in the section, we should append
+
+ Update test results for /fast/dynamic/013.html. In the old version the the rows
+ and cells were children of the first table section, a tfoot. They are now children
+ of the second table section, a tbody. Our rendering now matches Gecko and Win IE
+ (according to yusufg on #webkit, comparing with 013-expected.png) for this case.
+
+ * layout-tests/fast/dynamic/013-expected.checksum:
+ * layout-tests/fast/dynamic/013-expected.png:
+ * layout-tests/fast/dynamic/013-expected.txt:
+
+ Test cases added:
+
+ * layout-tests/fast/dynamic/014-expected.checksum: Added.
+ * layout-tests/fast/dynamic/014-expected.png: Added.
+ * layout-tests/fast/dynamic/014-expected.txt: Added.
+ * layout-tests/fast/dynamic/014.html: Added.
+ * layout-tests/fast/dynamic/015-expected.checksum: Added.
+ * layout-tests/fast/dynamic/015-expected.png: Added.
+ * layout-tests/fast/dynamic/015-expected.txt: Added.
+ * layout-tests/fast/dynamic/015.html: Added.
+
2005-09-20 Eric Seidel <eseidel at apple.com>
No review, SVG build fix only.
1.65 +2 -3 WebCore/khtml/html/html_tableimpl.cpp
Index: html_tableimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_tableimpl.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- html_tableimpl.cpp 16 Sep 2005 22:42:12 -0000 1.64
+++ html_tableimpl.cpp 21 Sep 2005 17:32:40 -0000 1.65
@@ -246,8 +246,7 @@
{
// there could be 2 tfoot elements in the table. Only the first one is the "foot", that's why we have the more
// complicated if statement below.
- if (node != foot && (node->hasTagName(theadTag) || node->hasTagName(tfootTag) ||
- node->hasTagName(tbodyTag)))
+ if (node != foot && (node->hasTagName(theadTag) || node->hasTagName(tfootTag) || node->hasTagName(tbodyTag)))
{
section = static_cast<HTMLTableSectionElementImpl *>(node);
lastSection = section;
@@ -255,7 +254,7 @@
if ( !append )
{
int rows = section->numRows();
- if ( rows > index ) {
+ if (rows >= index) {
found = true;
break;
} else
1.3 +1 -1 WebCore/layout-tests/fast/dynamic/013-expected.checksum
Index: 013-expected.checksum
===================================================================
RCS file: /cvs/root/WebCore/layout-tests/fast/dynamic/013-expected.checksum,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- 013-expected.checksum 1 Sep 2005 06:13:24 -0000 1.2
+++ 013-expected.checksum 21 Sep 2005 17:32:41 -0000 1.3
@@ -1 +1 @@
-b42b75a8c6eaf549f07d5e14dc393db7
\ No newline at end of file
+06865ab95974ae877485602dacdf80e0
\ No newline at end of file
1.3 +3 -1 WebCore/layout-tests/fast/dynamic/013-expected.png
<<Binary file>>
1.2 +6 -6 WebCore/layout-tests/fast/dynamic/013-expected.txt
Index: 013-expected.txt
===================================================================
RCS file: /cvs/root/WebCore/layout-tests/fast/dynamic/013-expected.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 013-expected.txt 15 Dec 2004 02:09:19 -0000 1.1
+++ 013-expected.txt 21 Sep 2005 17:32:41 -0000 1.2
@@ -3,17 +3,17 @@
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
- RenderTable {TABLE} at (0,0) size 200x42 [border: (1px outset #808080)]
- RenderTableSection {TFOOT} at (1,1) size 0x40
+ RenderTable {TABLE} at (0,0) size 200x200 [border: (1px outset #808080)]
+ RenderTableSection {TFOOT} at (1,199) size 0x0
+ RenderTableSection {TBODY} at (1,1) size 0x198
RenderTableRow {TR} at (0,0) size 0x0
- RenderTableCell {TD} at (0,0) size 97x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell {TD} at (0,39) size 97x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderText {TEXT} at (1,1) size 41x18
text run at (1,1) width 41: "span 1"
- RenderTableCell {TD} at (97,0) size 101x20 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (97,39) size 101x20 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderText {TEXT} at (1,1) size 41x18
text run at (1,1) width 41: "span 1"
RenderTableRow {TR} at (0,0) size 0x0
- RenderTableCell {TD} at (0,20) size 198x20 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=2]
+ RenderTableCell {TD} at (0,138) size 198x20 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=2]
RenderText {TEXT} at (1,1) size 87x18
text run at (1,1) width 87: "should span 2"
- RenderTableSection {TBODY} at (1,1) size 0x0
1.1 WebCore/layout-tests/fast/dynamic/014-expected.checksum
Index: 014-expected.checksum
===================================================================
b29073098432e74603c64eb0adb2936a
1.1 WebCore/layout-tests/fast/dynamic/014-expected.png
<<Binary file>>
1.1 WebCore/layout-tests/fast/dynamic/014-expected.txt
Index: 014-expected.txt
===================================================================
layer at (0,0) size 800x600
RenderCanvas at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x18
RenderText {TEXT} at (0,0) size 563x18
text run at (0,0) width 563: "You should see three rows below labeled \"row 1\", \"row 2\", \"row 3\", from top to bottom."
RenderTable {TABLE} at (0,34) size 43x68
RenderTableSection {TBODY} at (0,0) size 0x68
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (2,2) size 39x20 [r=0 c=0 rs=1 cs=1]
RenderText {TEXT} at (1,1) size 37x18
text run at (1,1) width 37: "row 1"
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (2,24) size 39x20 [r=1 c=0 rs=1 cs=1]
RenderText {TEXT} at (1,1) size 37x18
text run at (1,1) width 37: "row 2"
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (2,46) size 39x20 [r=2 c=0 rs=1 cs=1]
RenderText {TEXT} at (1,1) size 37x18
text run at (1,1) width 37: "row 3"
1.1 WebCore/layout-tests/fast/dynamic/014.html
Index: 014.html
===================================================================
<html>
<head>
<script type="text/javascript">
function showBug() {
var table, row, cell;
table = document.createElement("table");
document.body.appendChild(table);
row = table.insertRow(0);
row.insertCell(0).appendChild(document.createTextNode("row 1"));
row = table.insertRow(1);
row.insertCell(0).appendChild(document.createTextNode("row 2"));
row = table.insertRow(2);
row.insertCell(0).appendChild(document.createTextNode("row 3"));
}
</script>
</head>
<body onLoad="showBug();">
<p>You should see three rows below labeled "row 1", "row 2", "row 3", from top to bottom.</p>
</body>
</html>
1.1 WebCore/layout-tests/fast/dynamic/015-expected.checksum
Index: 015-expected.checksum
===================================================================
165cdcdccd061fb463b33010d6a28d10
1.1 WebCore/layout-tests/fast/dynamic/015-expected.png
<<Binary file>>
1.1 WebCore/layout-tests/fast/dynamic/015-expected.txt
Index: 015-expected.txt
===================================================================
layer at (0,0) size 800x600
RenderCanvas at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x36
RenderText {TEXT} at (0,0) size 763x36
text run at (0,0) width 763: "You should see a table with 6 rows, labeled \"Row_0\", \"Row_1\", \"Row_2\", \"Row_3\", \"Row_4\", \"Row_5\", from top to"
text run at (0,18) width 48: "bottom."
RenderTable {TABLE} at (0,52) size 57x148 [border: (1px outset #808080)]
RenderTableSection {TBODY} at (1,1) size 0x146
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (2,2) size 51x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderText {TEXT} at (2,2) size 47x18
text run at (2,2) width 47: "Row_0"
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (2,26) size 51x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
RenderText {TEXT} at (2,2) size 47x18
text run at (2,2) width 47: "Row_1"
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (2,50) size 51x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
RenderText {TEXT} at (2,2) size 47x18
text run at (2,2) width 47: "Row_2"
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (2,74) size 51x22 [border: (1px inset #808080)] [r=3 c=0 rs=1 cs=1]
RenderText {TEXT} at (2,2) size 47x18
text run at (2,2) width 47: "Row_3"
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (2,98) size 51x22 [border: (1px inset #808080)] [r=4 c=0 rs=1 cs=1]
RenderText {TEXT} at (2,2) size 47x18
text run at (2,2) width 47: "Row_4"
RenderTableRow {TR} at (0,0) size 0x0
RenderTableCell {TD} at (2,122) size 51x22 [border: (1px inset #808080)] [r=5 c=0 rs=1 cs=1]
RenderText {TEXT} at (2,2) size 47x18
text run at (2,2) width 47: "Row_5"
1.1 WebCore/layout-tests/fast/dynamic/015.html
Index: 015.html
===================================================================
<html>
<head>
<script type="text/javascript">
function addRows() {
var tbodyElem = document.getElementById("myTbody");
row0 = tbodyElem.insertRow(0);
row0.insertCell(0).appendChild(document.createTextNode("Row_0"));
row4 = tbodyElem.insertRow(tbodyElem.rows.length);
row4.insertCell(0).appendChild(document.createTextNode("Row_4"));
row5 = tbodyElem.insertRow(-1);
row5.insertCell(0).appendChild(document.createTextNode("Row_5"));
row6 = tbodyElem.insertRow(100);
row6.insertCell(0).appendChild(document.createTextNode("Row_6"));
}
</script>
</head>
<body onLoad="addRows()">
<p>You should see a table with 6 rows, labeled "Row_0", "Row_1", "Row_2", "Row_3", "Row_4", "Row_5", from top to bottom.</p>
<table border=1 id="myTbody">
<tr>
<td>Row_1</td>
</tr>
<tr>
<td>Row_2</td>
</tr>
<tr>
<td>Row_3</td>
</tr>
</table>
</body>
</html>
More information about the webkit-changes
mailing list