RESOLVED INVALID21075
Empty DIV regarded as opening DIV
https://bugs.webkit.org/show_bug.cgi?id=21075
Summary Empty DIV regarded as opening DIV
Andrew Charlton
Reported 2008-09-24 14:36:34 PDT
In a document with an empty DIV element (i.e. <div /> ), the element is regarded as unclosed. This screws up any rendering beyond that point.
Attachments
Test case (1.93 KB, text/html)
2008-09-24 14:41 PDT, Andrew Charlton
no flags
Dave Hyatt
Comment 1 2008-09-24 14:38:21 PDT
If you mean HTML, then that is correct behavior. Self-closing tag syntax is XML only and is not part of HTML. The determination of whether you are XML or not depends on the MIME type of the file.
Andrew Charlton
Comment 2 2008-09-24 14:41:09 PDT
Created attachment 23766 [details] Test case This test case shows three structurally equivalent tables. The third table, containing an empty <div /> is rendered incorrectly. Chrome's element inspector shows that the Column 3 element is interpreted to be inside the empty column 2 element.
Dave Hyatt
Comment 3 2008-09-24 14:58:33 PDT
As I said when I resolved the bug, self-closing syntax is not part of HTML. <div/> does not close a <div> in HTML. It only does so in XHTML. Serve your file with the XHTML MIME type (or even XML MIME type) to have it be treated as XHTML.
Note You need to log in before you can comment on or make changes to this bug.