This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Currently the "delete the contents" algorithm deletes any old range it's given. Every caller except delete/forwardDelete actually deletes the active range. The problem with deleting non-active ranges is it doesn't update the selection correctly. Example: calling delete on <ol><li>foo</li></ol>{}<br> produces <ol><li>foo</li></ol>{} in the current spec because the selection doesn't get moved. delete/forwardDelete can maybe be changed to change the selection before deleting. Or maybe there's some other fix that's better. (This is a minor bug in the current spec, not an issue implementers have to worry about.)
This is turning out to be a surprisingly big headache. Apparently my algorithms are so complicated and/or poorly documented that I can't understand them a month or two after writing them. I'll have to add more comments and/or refactor -- but for now, at least I have a good test suite!
http://aryeh.name/gitweb.cgi?p=editing;a=commitdiff;h=bc8218cc Filed bug 13973 on refactoring this so it's less of a nightmare.