Bug 74748

Summary: Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: HTML EditingAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, enrica, eric, japhet, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 74490    
Bug Blocks:    
Attachments:
Description Flags
cleanup eric: review+

Ryosuke Niwa
Reported 2011-12-16 14:23:06 PST
After http://trac.webkit.org/changeset/103104, the interface for unapply/reapplying an editing action has been changed from EditCommand to UndoStep. We should rename these methods as well.
Attachments
cleanup (25.55 KB, patch)
2011-12-16 14:52 PST, Ryosuke Niwa
eric: review+
Ryosuke Niwa
Comment 1 2011-12-16 14:52:36 PST
Eric Seidel (no email)
Comment 2 2011-12-16 15:04:13 PST
Comment on attachment 119678 [details] cleanup View in context: https://bugs.webkit.org/attachment.cgi?id=119678&action=review > Source/WebCore/editing/Editor.cpp:892 > - client()->registerCommandForUndo(toCompositeEditCommand(m_lastEditCommand.get())->ensureComposition()); > + client()->registerUndoStep(toCompositeEditCommand(m_lastEditCommand.get())->ensureComposition()); If we do this casting often we should have a lastCommandAsComposite() or similar accessor :)
Ryosuke Niwa
Comment 3 2011-12-16 15:16:08 PST
Comment on attachment 119678 [details] cleanup View in context: https://bugs.webkit.org/attachment.cgi?id=119678&action=review >> Source/WebCore/editing/Editor.cpp:892 >> + client()->registerUndoStep(toCompositeEditCommand(m_lastEditCommand.get())->ensureComposition()); > > If we do this casting often we should have a lastCommandAsComposite() or similar accessor :) Actually, this cast is no longer necessary as m_lastEditCommand's type is now RefPtr<CompositeEditCommand>. Will remove the cast.
Ryosuke Niwa
Comment 4 2011-12-16 15:34:44 PST
Note You need to log in before you can comment on or make changes to this bug.