[whatwg] Feedback on UndoManager spec

On Tue, Nov 8, 2011 at 6:12 AM, Aryeh Gregor <ayg at aryeh.name> wrote:
>
>  > Yeah, it'll be nice if we could define the behavior precisely but then
> > again, there's nothing that prevents authors from modifying DOM in any
> > arbitrary way.
>
> Right, but at least then it will either work in all browsers or break
> in all browsers.
>

I don't really follow your logic here.

On Mon, Nov 7, 2011 at 11:27 PM, Jonas Sicking <jonas at sicking.cc> wrote:
> > Yes, we don't want to track all changes ever made, that is indeed
> expensive.
>
> What does Gecko actually do, roughly?  In my second test from before,
> it looks like undo undoes a change to an unrelated part of the DOM,
> which suggests Gecko is actually tracking all changes to the DOM:
>

Regardless of what Gecko currently does, I expect keeping all changes to
the DOM outside transaction to be very expensive for most UAs.

On Mon, Nov 7, 2011 at 11:54 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> > It'll be nice if we could specify that precisely. From what Anne told me
> > today, all DOM operations are defined in terms
> > of
> http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node-insert
> > and
> http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node-remove
> > so we can probably define what should happen when unapplying/reapplying
> > either one.
>
> There are also attribute changes, and changes to CharacterData data,
> and changes to JS expando attributes.
>

Attributes are easy because it's just a string, and we can always restore
that. CharacterData is tricky since I don't want force UAs to store the
entire old data.

- Ryosuke

Received on Tuesday, 8 November 2011 08:55:04 UTC