[whatwg] Fixing undo on the Web - UndoManager and Transaction

On Thu, Oct 27, 2011 at 4:23 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> Hi all,
> I've updated the document:?http://rniwa.com/editing/undomanager.html?per
> discussions.
> Summary of changes:
>
> "transaction" is renamed to "DOM transaction"
> The value of isAutomatic is read immediately before the transaction is
> applied
> Swapped the definition of clearUndo and clearRedo in the non-normative
> section to match the rest of the spec
> transact() no longer attempts to merge transactions when there are no
> transactions to merge with
> Incorporated Aryeh's feedback
> DOM state now include IDL properties and their values

Wait, the last bullet point doesn't mean that changes to IDL
properties are in general rolled back, does it? That would be
extremely hard to implement in general. It also creates all sorts of
weird behavior. Would you for example want to reset
HTMLMediaElement.currentTime? And if you set Element.innerHTML back to
the value it used to be, it will create all node Nodes.

We should just pay attention to changes to Node values, childlists,
attribute maps and possibly a few other things.

/ Jonas

Received on Thursday, 27 October 2011 18:22:13 UTC