[whatwg] Feedback on UndoManager spec
Ryosuke Niwa
rniwa at webkit.org
Mon Nov 7 20:54:54 PST 2011
On Mon, Nov 7, 2011 at 8:27 PM, Jonas Sicking <jonas at sicking.cc> wrote:
> What we should do is to define exactly how the tracking works, and
> what exact operations the browser does to revert a automatic
> transaction.
>
Yeah, it'll be ideal if we could specify that.
For example, if we say that for each node removed when a automatic
> transaction is created, the browser records that nodes old parent and
> previous sibling. Then we can say that when the automatic transaction
> is undone, the browser checks that the old previous sibling is still a
> child of the parent (unless the previous sibling was null), if the
> test passes, the browser inserts the removed node after the previous
> sibling in the parent.
>
> We could also remember both the following and previous sibling in
> order to be more resilient against unrecorded mutations.
>
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-insertand
http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node-removeso
we can probably define what should happen when unapplying/reapplying
either one.
- Ryosuke
More information about the whatwg
mailing list