Bug 42404 - deleteCol{1,2,3} and insertCols{1,2,3} will fail in HTML5 parser
Summary: deleteCol{1,2,3} and insertCols{1,2,3} will fail in HTML5 parser
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks: 41123 42346
  Show dependency treegraph
 
Reported: 2010-07-15 14:01 PDT by Adam Barth
Modified: 2010-07-15 14:39 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.66 KB, patch)
2010-07-15 14:06 PDT, Adam Barth
eric: review+
eric: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2010-07-15 14:01:29 PDT
deleteCol{1,2,3} and insertCols{1,2,3} will fail in HTML5 parser
Comment 1 Adam Barth 2010-07-15 14:06:51 PDT
Created attachment 61716 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-07-15 14:13:49 PDT
What does IE do?  It may be expected that table.removeChild(col) works even if col is not a direct child of table.  I feel like I've seen similar hacks like that in the DOM for table support.
Comment 3 Adam Barth 2010-07-15 14:17:06 PDT
The tests fail in IE8 as currently written.  Let me try the new versions.
Comment 4 Adam Barth 2010-07-15 14:19:31 PDT
The new tests seem to fail in IE8 also for layout reasons.  However, the DOM operations appear to work as expected.
Comment 5 Adam Barth 2010-07-15 14:20:11 PDT
Bottom line: this colgroup business appears to make us more IE-like.
Comment 6 Eric Seidel (no email) 2010-07-15 14:23:56 PDT
so IE adds implicit colgroup elements, but table.removeChild(col) still works?  Does table.removeChild(col) remove the colgroup too?
Comment 7 Adam Barth 2010-07-15 14:27:01 PDT
(In reply to comment #6)
> so IE adds implicit colgroup elements, but table.removeChild(col) still works?

No.  The test as written fails in IE the same way it will fail with the HTML5 parser.

> Does table.removeChild(col) remove the colgroup too?

No.  It throws an illegal instruction exception, similar to exception we'll throw.
Comment 8 Eric Seidel (no email) 2010-07-15 14:29:24 PDT
Comment on attachment 61716 [details]
Patch

Please update the ChangeLog to explain that you tested in IE8, etc. and explain IE's exact behavior.  I think it's important for us to justify this change for future readers of these tests.

I wonder if old FF added implicit colgroup elements or not.

Thank you for looking at this.
Comment 9 Adam Barth 2010-07-15 14:39:38 PDT
Committed r63464: <http://trac.webkit.org/changeset/63464>