Bug 64416

Summary: Don't reuse the last InsertTextCommand
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: HTML EditingAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, enrica, justin.garcia, leviw, morrita, tkent
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 64414    
Attachments:
Description Flags
Patch justin.garcia: review+

Ryosuke Niwa
Reported Wednesday, July 13, 2011 2:02:12 AM UTC
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.
Attachments
Patch (9.62 KB, patch)
2011-07-12 18:09 PDT, Ryosuke Niwa
justin.garcia: review+
Ryosuke Niwa
Comment 1 Wednesday, July 13, 2011 2:09:30 AM UTC
Hajime Morrita
Comment 2 Wednesday, July 13, 2011 6:34:25 AM UTC
Comment on attachment 100601 [details] Patch Wow, I thought this reuse is for handling undo. But it isn't true....
Ryosuke Niwa
Comment 3 Wednesday, July 13, 2011 7:22:14 AM UTC
(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.
Justin Garcia
Comment 4 Wednesday, July 13, 2011 8:41:13 AM UTC
Comment on attachment 100601 [details] Patch Looks like you could get rid of: virtual bool isInsertTextCommand() const; as it is now unused.
Ryosuke Niwa
Comment 5 Wednesday, July 13, 2011 8:42:57 AM UTC
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.
Ryosuke Niwa
Comment 6 Wednesday, July 13, 2011 6:55:24 PM UTC
Note You need to log in before you can comment on or make changes to this bug.