[Webkit-unassigned] [Bug 16659] New: Acid3 expects table.appendChild(document.createElement('tr')) to increment row count

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 28 22:19:32 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=16659

           Summary: Acid3 expects
                    table.appendChild(document.createElement('tr')) to
                    increment row count
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org
                CC: bdakin at apple.com


Acid3 expects table.appendChild(document.createElement('tr')) to increment row
count

I had expected this to work as well... but maybe I'm missing something.  I was
debugging this in Drosera and checking "table.rows.length" after each
statement.  "table.appendChild(rows[1]);" seemed to fail to cause the row count
to increment, which is likely why table.rows.length == 5 instead of 6, and thus
the test failed.

    function () {
      // test 66: test the ordering and creation of rows
      var table = document.createElement('table');
      var rows = [
        document.createElement('tr'),    // 0: ends up first child of the tfoot
        document.createElement('tr'),    // 1: goes at the end of the table
        document.createElement('tr'),    // 2: becomes second child of thead
        document.createElement('tr'),    // 3: becomes third child of the thead
        document.createElement('tr'),    // 4: not in the table
        table.insertRow(0),              // 5: not in the table
        table.createTFoot().insertRow(0) // 6: ends up second in the tfoot
      ];
      rows[6].parentNode.appendChild(rows[0]);
      table.appendChild(rows[1]);
      table.insertBefore(document.createElement('thead'), table.firstChild);
      table.firstChild.appendChild(rows[2]);
      rows[2].parentNode.appendChild(rows[3]);
      rows[4].appendChild(rows[5].parentNode);
      table.insertRow(0);
      table.tFoot.appendChild(rows[6]);
      if (table.rows.length == 6 &&
          table.getElementsByTagName('tr').length == 6 &&
          table.childNodes.length == 3 &&
          table.childNodes[0] == table.tHead &&
          table.getElementsByTagName('tr')[0] == table.tHead.childNodes[0] &&
          table.getElementsByTagName('tr')[1] == table.tHead.childNodes[1] &&
          table.getElementsByTagName('tr')[1] == rows[2] &&
          table.getElementsByTagName('tr')[2] == table.tHead.childNodes[2] &&
          table.getElementsByTagName('tr')[2] == rows[3] &&
          table.childNodes[1] == table.tFoot &&
          table.getElementsByTagName('tr')[3] == table.tFoot.childNodes[0] &&
          table.getElementsByTagName('tr')[3] == rows[0] &&
          table.getElementsByTagName('tr')[4] == table.tFoot.childNodes[1] &&
          table.getElementsByTagName('tr')[4] == rows[6] &&
          table.getElementsByTagName('tr')[5] == table.childNodes[2] &&
          table.getElementsByTagName('tr')[5] == rows[1] &&
          table.tBodies.length == 0)
        return 5;
    },


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list