WebCore:
Reviewed by Ken.
- architecture for WebCore part of fix for <rdar://problem/
3790011> undoable operations all say "Undo" in the menu,
no specific action names
The remaining step is to make each EditCommand subclass override editingAction() to return an
appropriate value. (Unfortunately the mapping between subclass and user-distinguishable action
is not completely straightforward, so this next step isn't trivial.)
* khtml/editing/htmlediting.h:
new enum for HTMLEditAction
* khtml/editing/htmlediting.cpp:
(khtml::EditCommandPtr::editingAction):
new method, calls through to EditCommand
(khtml::EditCommand::editingAction):
new method for subclasses to override, returns HTMLEditActionUnspecified at this level
(khtml::TypingCommand::editingAction):
proof of concept override, returns HTMLEditActionTyping
* kwq/KWQKHTMLPart.h:
declare new private bottleneck method registerCommandForUndoOrRedo
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::registerCommandForUndoOrRedo):
new bottleneck method to reduce code duplication; now calls over the bridge
to get the localized string to use for the Undo action name
(KWQKHTMLPart::registerCommandForUndo):
now calls new bottleneck method
(KWQKHTMLPart::registerCommandForRedo):
now calls new bottleneck method
* kwq/WebCoreBridge.h:
new enum for WebUndoAction, maps directly to HTMLEditAction.
Declaration of nameForUndoAction:
WebKit:
Reviewed by Ken.
- WebKit part of fix for <rdar://problem/
3790011> undoable operations all say "Undo" in the menu,
no specific action names
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge nameForUndoAction:]):
renamed from setUndoActionNamePlaceholder, replaced arbitrary integers with enum values, and
handled new "unspecified" case as a fallback
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8206
268f45cc-cd09-0410-ab3c-
d52691b4dbfc