Bug 26170

Summary: Closing <li> should close nested <div>
Product: WebKit Reporter: Ian Taylor <itaylor>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
A test case showing the innerHTML value on a self closed xml tag.
none
The same file but submitted as application/xhtml+xml
none
A test case showing the innerHTML value on a self closed xml tag.
none
test case for landing none

Description Ian Taylor 2009-06-03 12:00:03 PDT
While self-closed tags are not a supported part of XHTML in any of the three major browsers, the failure condition in WebKit differs from that of IE and Firefox.  

It appears as though Webkit's search for a close tag for the "missing" close tag of the self closed tag is scoped differently than IE and Firefox.

I've attached a test case that reproduces the behavior.
(see bug 26151 for more discussion of self-closed tags)
Comment 1 Ian Taylor 2009-06-03 12:01:15 PDT
Created attachment 30917 [details]
A test case showing the innerHTML value on a self closed xml tag.
Comment 2 Ian Taylor 2009-06-03 12:02:53 PDT
Created attachment 30918 [details]
The same file but submitted as application/xhtml+xml
Comment 3 Ian Taylor 2009-06-03 12:04:44 PDT
Created attachment 30919 [details]
A test case showing the innerHTML value on a self closed xml tag.
Comment 4 Alexey Proskuryakov 2009-06-04 01:15:32 PDT
This has nothing to do with "self-closing" tags - every browser treats <div/> exactly like <div> in HTML.

I can confirm that this source is parsed differently than in Firefox and than HTML5 postulates - "<div id='foo'/>Hello</li>" should be equivalent to "<div id='foo'>Hello</div></li>", not "<div id='foo'>Hello</li></div>". Re-titling accordingly.
Comment 5 Adam Barth 2010-09-21 04:09:19 PDT
Created attachment 68215 [details]
test case for landing
Comment 6 Alexey Proskuryakov 2010-09-21 10:22:21 PDT
Comment on attachment 68215 [details]
test case for landing

/me is happy today.
Comment 7 WebKit Commit Bot 2010-09-21 11:32:50 PDT
Comment on attachment 68215 [details]
test case for landing

Clearing flags on attachment: 68215

Committed r67969: <http://trac.webkit.org/changeset/67969>
Comment 8 WebKit Commit Bot 2010-09-21 11:32:55 PDT
All reviewed patches have been landed.  Closing bug.