[Webkit-unassigned] [Bug 47428] Redo in ReplaceNodeWithSpanCommand is broken

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 8 15:58:23 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=47428





--- Comment #3 from Ryosuke Niwa <rniwa at webkit.org>  2010-10-08 15:58:22 PST ---
(In reply to comment #2)
> We may never get around to this, but long ago I wanted to change SimpleEditCommand and CompositeEditCommand to be completely separate concepts. The SimpleEditCommand would be more of an UndoStep object, with the sole responsibility of being an undoable operation. The CompositeEditCommand objects would be created only during the original editing operation and would be responsible for the more complex process of deciding what to do the first time around, but would then be deallocated and would no longer be around doing the undo/redo process.

I think the current implementation works almost like that.  Except CompositeEditCommand's doUnapply and doReapply of CompositeEditCommand still exist to as a stub / driver for SimpleEditCommands that compose the composite command. If we completely got rid of CompositeEditCommand, how do we determine which SimpleEditCommands correspond to which undo position?

e.g.
1. user bolden text
2. user italicize text
3. user undo italicize

In this case, each ApplyStyleCommand of step 1 and 2 will generate a bunch of SimpleEditCommands.  But we need some way to group commands together so that we can undo only SimpleEditCommands added by step 2 in step 3.  If we didn't have CompositeEditCommand at undo/redo, how do we determine that?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list