Bug 74748 - Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
: Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
Status: RESOLVED FIXED
: WebKit
HTML Editing
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
: 74490
:
  Show dependency treegraph
 
Reported: 2011-12-16 14:23 PST by
Modified: 2011-12-16 15:34 PST (History)


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


Note

You need to log in before you can comment on or make changes to this bug.


Description From 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 From 2011-12-16 14:52:36 PST -------
Created an attachment (id=119678) [details]
cleanup
------- Comment #2 From 2011-12-16 15:04:13 PST -------
(From update of attachment 119678 [details])
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 From 2011-12-16 15:16:08 PST -------
(From update of attachment 119678 [details])
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 From 2011-12-16 15:34:44 PST -------
Committed r103119: <http://trac.webkit.org/changeset/103119>