[whatwg] Ongoing work on an editing commands (execCommand()) specification

On Thu, Mar 17, 2011 at 3:31 PM, Aryeh Gregor <Simetrical+w3c at gmail.com>wrote:

> I just rewrote the spec, and it's now both shorter and produces better
> results.  For a quick view of the results, as compared to the browser
> you're currently using, you can look here:
>
> http://aryeh.name/spec/editcommands/autoimplementation.html


Thanks for the rewrite.  New results look much more promising.


> * In one case, WebKit normalizes markup more aggressively than the
> spec does, so it winds up being shorter and still correct, but only
> because the spec ignored ancestors beyond what it had to modify; I'm
> ambivalent about this one
>

One thing we might want to consider is to merge elements when forcing style
or pushing down style.  For example, if we had "<b>hello </b>world" and
bolded "world", I'd expect to get "<b>hello world</b>" instead of "<b>hello
</b><b>world</b>".  While it's not that much of an improvement in this very
simple case, the effect is obvious when the applied on more complicated
markup.

I hope this addresses many of Ryosuke's objections to my previous algorithm.
>

Yes, it addresses most of my current concerns except StyleWithCSS.  I think
we should just obsolete StyleWithCSS and let it unspecified so that we can
keep it backward compatible.

- Ryosuke

Received on Tuesday, 22 March 2011 12:37:42 UTC