|Summary:||Don't reuse the last InsertTextCommand|
|Product:||WebKit||Reporter:||Ryosuke Niwa <rniwa>|
|Component:||HTML Editing||Assignee:||Ryosuke Niwa <rniwa>|
|Severity:||Normal||CC:||darin, enrica, justin.garcia, leviw, morrita, tkent|
|Version:||528+ (Nightly build)|
|Bug Depends on:|
Description Ryosuke Niwa 2011-07-12 18:02:12 PDT
It seems unnecessary to reuse the last InsertTextCommand in TypingCommand. Changing the interface of InsertTextCommand to use doApply will make fixing the bug 64414 easier.
Comment 2 Hajime Morrita 2011-07-12 22:34:25 PDT
Comment on attachment 100601 [details] Patch Wow, I thought this reuse is for handling undo. But it isn't true....
Comment 3 Ryosuke Niwa 2011-07-12 23:22:14 PDT
(In reply to comment #2) > (From update of attachment 100601 [details]) > Wow, I thought this reuse is for handling undo. But it isn't true.... Undo/Redo is taken care by reusing TypingCommand. I'm guessing that this is an artifact of old days when InsertTextCommand was used differently than it is today.
Comment 4 Justin Garcia 2011-07-13 00:41:13 PDT
Comment on attachment 100601 [details] Patch Looks like you could get rid of: virtual bool isInsertTextCommand() const; as it is now unused.
Comment 5 Ryosuke Niwa 2011-07-13 00:42:57 PDT
Thanks for the review! (In reply to comment #4) > (From update of attachment 100601 [details]) > Looks like you could get rid of: > > virtual bool isInsertTextCommand() const; > > as it is now unused. Oh, you're right. I'll do that before I land.