I am working on it, following two different paths. First a JS prototype, because it's much easier to test what can be done and what cannot. Then additions to nsHTMLContentSerializer to make the core generate the source view, taking advantage from all char2entity encodings, indentation and magic.

Update: Debout Hérauts, Résonnez Trompettes!!! I forgot to mention that this will almost certainly help fixing this old bug :-)