Bug 74748 - Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
: Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: HTML Editing
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Ryosuke Niwa
:
Depends on: 74490
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-16 14:23 PST by Ryosuke Niwa
Modified: 2011-12-16 15:34 PST (History)
6 users (show)

See Also:


Attachments
cleanup (25.55 KB, patch)
2011-12-16 14:52 PST, Ryosuke Niwa
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 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.
Comment 1 Ryosuke Niwa 2011-12-16 14:52:36 PST
Created attachment 119678 [details]
cleanup
Comment 2 Eric Seidel 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 :)
Comment 3 Ryosuke Niwa 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.
Comment 4 Ryosuke Niwa 2011-12-16 15:34:44 PST
Committed r103119: <http://trac.webkit.org/changeset/103119>