0. Launch Blot_editableDiv_showSource, my modified version of "Blot" available from <http://dan.karelia.com/webkit/Blot_editableDiv_showSource.zip> with DYLD_FRAMEWORK_PATH pointing to TOT. (I'm using r18941)
1. Click in the top panel
2. Type in a few letters of text
3. Backspace until they are all gone
Results: In the source (created by dumping innerHTML of the document) leaves a <br> tag in the div.
Expected: The div should be empty, as it was before we started editing.
The above test was done with just a really simple html page, e.g. <html><body> ... </body></html>.
I noticed that if you use a XHTML strict DTD, then the markup is even worse!
The contents of the div shoudl be empty, and yet instead we have this extra div tag and the BR with an internal class. (Plus note that the tag doesn't self-close.)
Related to bug 12153?
Yes, it might be related --but this is a more general case, with an easy-to-confirm test.
>In the source (created by dumping innerHTML of the document) leaves a
> <br> tag in the div.
Empty divs have no height. That's why we insert placeholders. The fact that we prop open ones that are empty in the source is a convenience.
> I noticed that if you use a XHTML strict DTD, then the markup is even worse!
> <div><br class="webkit-block-placeholder"></div>
> The contents of the div shoudl be empty, and yet instead we have this extra
> div tag
I can't reproduce this.
Finally, the fact that the placeholders have a special class on them is covered in 12317.
Given all this, I'm closing this bug. Re-open it if you can still reproduce the bug where an *extra* div is inserted when the contents of the editable root are removed.