Changeset 63464 in webkit


Ignore:
Timestamp:
Jul 15, 2010 2:39:27 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-07-15 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

deleteCol{1,2,3} and insertCols{1,2,3} will fail in HTML5 parser
https://bugs.webkit.org/show_bug.cgi?id=42404

The HTML5 parser adds an implied colgroup element as a parent of the
col element. This DOM change breaks these tests because they assume
the col element's parent is the table element. However, these tests
don't appear to be intended to test this behavior specifically.

I checked the behavior in IE8. These tests fail in IE8 in the same way
that they fail under the HTML5 parser (i.e., with an exception), which
leads me to believe that we're moving in the right direction. With this
patch, the DOM operations succeed in IE8 but the tests fail because the
layout isn't what we expect. I'm not sure whose layout is correct, but
that's not really my concern in this patch.

  • tables/mozilla/dom/deleteCol1.html:
  • tables/mozilla/dom/deleteCol2.html:
  • tables/mozilla/dom/deleteCol3.html:
  • tables/mozilla/dom/insertCols1.html:
  • tables/mozilla/dom/insertCols2.html:
  • tables/mozilla/dom/insertCols3.html:
Location:
trunk/LayoutTests
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r63461 r63464  
     12010-07-15  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        deleteCol{1,2,3} and insertCols{1,2,3} will fail in HTML5 parser
     6        https://bugs.webkit.org/show_bug.cgi?id=42404
     7
     8        The HTML5 parser adds an implied colgroup element as a parent of the
     9        col element. This DOM change breaks these tests because they assume
     10        the col element's parent is the table element. However, these tests
     11        don't appear to be intended to test this behavior specifically.
     12
     13        I checked the behavior in IE8. These tests fail in IE8 in the same way
     14        that they fail under the HTML5 parser (i.e., with an exception), which
     15        leads me to believe that we're moving in the right direction. With this
     16        patch, the DOM operations succeed in IE8 but the tests fail because the
     17        layout isn't what we expect. I'm not sure whose layout is correct, but
     18        that's not really my concern in this patch.
     19
     20        * tables/mozilla/dom/deleteCol1.html:
     21        * tables/mozilla/dom/deleteCol2.html:
     22        * tables/mozilla/dom/deleteCol3.html:
     23        * tables/mozilla/dom/insertCols1.html:
     24        * tables/mozilla/dom/insertCols2.html:
     25        * tables/mozilla/dom/insertCols3.html:
     26
    1272010-07-15  Ojan Vafai  <ojan@chromium.org>
    228
  • trunk/LayoutTests/tables/mozilla/dom/deleteCol1.html

    r13335 r63464  
    55
    66function doIt() {
    7   var table = document.getElementsByTagName("TABLE")[0];
    87  var col = document.getElementsByTagName("COL")[0];
    9   table.removeChild(col);
     8  col.parentNode.removeChild(col);
    109}
    1110</SCRIPT> 
  • trunk/LayoutTests/tables/mozilla/dom/deleteCol2.html

    r13335 r63464  
    55
    66function doIt() {
    7   var table = document.getElementsByTagName("TABLE")[0];
    87  var col = document.getElementsByTagName("COL")[1];
    9   table.removeChild(col);
     8  col.parentNode.removeChild(col);
    109}
    1110</SCRIPT> 
  • trunk/LayoutTests/tables/mozilla/dom/deleteCol3.html

    r13335 r63464  
    55
    66function doIt() {
    7   var table = document.getElementsByTagName("TABLE")[0];
    87  var col = document.getElementsByTagName("COL")[2];
    9   table.removeChild(col);
     8  col.parentNode.removeChild(col);
    109}
    1110</SCRIPT> 
  • trunk/LayoutTests/tables/mozilla/dom/insertCols1.html

    r13335 r63464  
    55
    66function doIt() {
    7   var table = document.getElementsByTagName("TABLE")[0];
    87  var refCol = document.getElementsByTagName("COL")[0];
    98  var col = document.createElement("COL", null);
    109  col.width = 100;
    11   table.insertBefore(col, refCol);
     10  refCol.parentNode.insertBefore(col, refCol);
    1211}
    1312</SCRIPT> 
  • trunk/LayoutTests/tables/mozilla/dom/insertCols2.html

    r13335 r63464  
    55
    66function doIt() {
    7   var table = document.getElementsByTagName("TABLE")[0];
    87  var refCol = document.getElementsByTagName("COL")[1];
    98  var col = document.createElement("COL", null);
    109  col.width = 200;
    11   table.insertBefore(col, refCol);
     10  refCol.parentNode.insertBefore(col, refCol);
    1211}
    1312</SCRIPT> 
  • trunk/LayoutTests/tables/mozilla/dom/insertCols3.html

    r13335 r63464  
    55
    66function doIt() {
    7   var table = document.getElementsByTagName("TABLE")[0];
    87  var refCol = document.getElementsByTagName("COL")[2];
    98  var col = document.createElement("COL", null);
    109  col.width = 150;
    11   table.insertBefore(col, refCol);
     10  refCol.parentNode.insertBefore(col, refCol);
    1211}
    1312</SCRIPT> 
Note: See TracChangeset for help on using the changeset viewer.