W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2011

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

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Tue, 22 Mar 2011 12:37:42 -0700
Message-ID: <AANLkTimhmSVi7y-QG3e_jSZnSJ3WT+dWt7mOnooibDox@mail.gmail.com>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC