- Revision
- 102357
- Author
- rn...@webkit.org
- Date
- 2011-12-08 11:32:17 -0800 (Thu, 08 Dec 2011)
Log Message
CompositeEditCommand should not be kept alive for undo and redo
https://bugs.webkit.org/show_bug.cgi?id=64414
Reviewed by Enrica Casucci.
This patch introduces EditCommandComposition that replaces CompositeEditCommand for
undo and redo purposes. Furthermore, we now keep a list of commands instead of a tree of commands
to unapply and reapply edit commands that composes an undoable action.
Each top-level CompositeEditCommand holds a ref-pointer to EditCommandComposition,
and applyCommandToComposite adds new SimpleEditCommands to the list.
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::create):
(WebCore::EditCommandComposition::doApply): Never used.
(WebCore::EditCommandComposition::doUnapply):
(WebCore::EditCommandComposition::doReapply):
(WebCore::EditCommandComposition::append):
(WebCore::CompositeEditCommand::~CompositeEditCommand): Add an assertion to ensure we didn't create
a composition for CompositeEditCommands that have parents.
(WebCore::CompositeEditCommand::doUnapply): Never used.
(WebCore::CompositeEditCommand::doReapply): Never used.
(WebCore::CompositeEditCommand::ensureComposition): Creates and attaches a EditCommandComposition.
(WebCore::CompositeEditCommand::applyCommandToComposite): Append a SimpleEditCommand to the composition.
* editing/CompositeEditCommand.h:
(WebCore::EditCommandComposition::EditCommandComposition):
(WebCore::CompositeEditCommand::composition):
(WebCore::toEditCommandComposition):
(WebCore::toCompositeEditCommand):
* editing/DeleteButtonController.cpp: Wrap RemoveNodeCommand in RemoveTargetCommand since top level
commands are now required to be a CompositeEditCommand.
(WebCore::RemoveTargetCommand::create):
(WebCore::RemoveTargetCommand::RemoveTargetCommand):
(WebCore::RemoveTargetCommand::doApply):
(WebCore::DeleteButtonController::deleteTarget):
* editing/EditCommand.cpp:
(WebCore::EditCommand::EditCommand): New constructor; used by EditCommandComposition.
(WebCore::EditCommand::apply): Create a composition for a top-level command.
(WebCore::EditCommand::unapply): Since we clear m_parent of SimpleEditCommand as soon as they are
added to EditCommandComposition, we can't use isTopLevelCommand() to differentiate EditCommandComposition
from SimpleEditCommand. Use isEditCommandComposition() instead.
(WebCore::EditCommand::reapply): Ditto.
(WebCore::compositionIfPossible):
(WebCore::EditCommand::setStartingSelection): Update the starting selection of EditCommandComposition.
(WebCore::EditCommand::setEndingSelection): Ditto.
(WebCore::EditCommand::setParent): Accepts a null pointer in order to avoid keeping a stale pointer in
m_parent inside SimpleEditCommand when CompositeEditCommand goes away.
* editing/EditCommand.h:
(WebCore::EditCommand::isSimpleEditCommand):
(WebCore::EditCommand::isCompositeEditCommand):
(WebCore::EditCommand::isEditCommandComposition):
(WebCore::EditCommand::parent):
(WebCore::toSimpleEditCommand):
* editing/Editor.cpp:
(WebCore::Editor::appliedEditing): Register a EditCommandComposition, instead of a CompositeEditCommand
to the undo stack.
(WebCore::Editor::unappliedEditing): Unapplied or reapplied commands are now always EditCommandComposition.
(WebCore::Editor::reappliedEditing):
* editing/Editor.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (102356 => 102357)
--- trunk/Source/WebCore/ChangeLog 2011-12-08 19:25:47 UTC (rev 102356)
+++ trunk/Source/WebCore/ChangeLog 2011-12-08 19:32:17 UTC (rev 102357)
@@ -1,3 +1,70 @@
+2011-12-08 Ryosuke Niwa <rn...@webkit.org>
+
+ CompositeEditCommand should not be kept alive for undo and redo
+ https://bugs.webkit.org/show_bug.cgi?id=64414
+
+ Reviewed by Enrica Casucci.
+
+ This patch introduces EditCommandComposition that replaces CompositeEditCommand for
+ undo and redo purposes. Furthermore, we now keep a list of commands instead of a tree of commands
+ to unapply and reapply edit commands that composes an undoable action.
+
+ Each top-level CompositeEditCommand holds a ref-pointer to EditCommandComposition,
+ and applyCommandToComposite adds new SimpleEditCommands to the list.
+
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::EditCommandComposition::create):
+ (WebCore::EditCommandComposition::doApply): Never used.
+ (WebCore::EditCommandComposition::doUnapply):
+ (WebCore::EditCommandComposition::doReapply):
+ (WebCore::EditCommandComposition::append):
+ (WebCore::CompositeEditCommand::~CompositeEditCommand): Add an assertion to ensure we didn't create
+ a composition for CompositeEditCommands that have parents.
+ (WebCore::CompositeEditCommand::doUnapply): Never used.
+ (WebCore::CompositeEditCommand::doReapply): Never used.
+ (WebCore::CompositeEditCommand::ensureComposition): Creates and attaches a EditCommandComposition.
+ (WebCore::CompositeEditCommand::applyCommandToComposite): Append a SimpleEditCommand to the composition.
+
+ * editing/CompositeEditCommand.h:
+ (WebCore::EditCommandComposition::EditCommandComposition):
+ (WebCore::CompositeEditCommand::composition):
+ (WebCore::toEditCommandComposition):
+ (WebCore::toCompositeEditCommand):
+
+ * editing/DeleteButtonController.cpp: Wrap RemoveNodeCommand in RemoveTargetCommand since top level
+ commands are now required to be a CompositeEditCommand.
+ (WebCore::RemoveTargetCommand::create):
+ (WebCore::RemoveTargetCommand::RemoveTargetCommand):
+ (WebCore::RemoveTargetCommand::doApply):
+ (WebCore::DeleteButtonController::deleteTarget):
+
+ * editing/EditCommand.cpp:
+ (WebCore::EditCommand::EditCommand): New constructor; used by EditCommandComposition.
+ (WebCore::EditCommand::apply): Create a composition for a top-level command.
+ (WebCore::EditCommand::unapply): Since we clear m_parent of SimpleEditCommand as soon as they are
+ added to EditCommandComposition, we can't use isTopLevelCommand() to differentiate EditCommandComposition
+ from SimpleEditCommand. Use isEditCommandComposition() instead.
+ (WebCore::EditCommand::reapply): Ditto.
+ (WebCore::compositionIfPossible):
+ (WebCore::EditCommand::setStartingSelection): Update the starting selection of EditCommandComposition.
+ (WebCore::EditCommand::setEndingSelection): Ditto.
+ (WebCore::EditCommand::setParent): Accepts a null pointer in order to avoid keeping a stale pointer in
+ m_parent inside SimpleEditCommand when CompositeEditCommand goes away.
+
+ * editing/EditCommand.h:
+ (WebCore::EditCommand::isSimpleEditCommand):
+ (WebCore::EditCommand::isCompositeEditCommand):
+ (WebCore::EditCommand::isEditCommandComposition):
+ (WebCore::EditCommand::parent):
+ (WebCore::toSimpleEditCommand):
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::appliedEditing): Register a EditCommandComposition, instead of a CompositeEditCommand
+ to the undo stack.
+ (WebCore::Editor::unappliedEditing): Unapplied or reapplied commands are now always EditCommandComposition.
+ (WebCore::Editor::reappliedEditing):
+ * editing/Editor.h:
+
2011-12-08 Stephen White <senorbla...@chromium.org>
Add missing V8 bindings to get CSS_FILTERS to compile in Chromium.
Modified: trunk/Source/WebCore/editing/CompositeEditCommand.cpp (102356 => 102357)
--- trunk/Source/WebCore/editing/CompositeEditCommand.cpp 2011-12-08 19:25:47 UTC (rev 102356)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.cpp 2011-12-08 19:32:17 UTC (rev 102357)
@@ -70,48 +70,95 @@
using namespace HTMLNames;
-CompositeEditCommand::CompositeEditCommand(Document *document)
- : EditCommand(document)
+PassRefPtr<EditCommandComposition> EditCommandComposition::create(Document* document,
+ const VisibleSelection& startingSelection, const VisibleSelection endingSelection)
{
+ return adoptRef(new EditCommandComposition(document, startingSelection, endingSelection));
}
-CompositeEditCommand::~CompositeEditCommand()
+void EditCommandComposition::doApply()
{
+ ASSERT_NOT_REACHED();
}
-void CompositeEditCommand::doUnapply()
+void EditCommandComposition::doUnapply()
{
size_t size = m_commands.size();
for (size_t i = size; i != 0; --i)
m_commands[i - 1]->unapply();
}
-void CompositeEditCommand::doReapply()
+void EditCommandComposition::doReapply()
{
size_t size = m_commands.size();
for (size_t i = 0; i != size; ++i)
m_commands[i]->reapply();
}
+void EditCommandComposition::append(SimpleEditCommand* command)
+{
+ m_commands.append(command);
+}
+
+CompositeEditCommand::CompositeEditCommand(Document *document)
+ : EditCommand(document)
+{
+}
+
+CompositeEditCommand::~CompositeEditCommand()
+{
+ ASSERT(isTopLevelCommand() || !m_composition);
+}
+
+void CompositeEditCommand::doUnapply()
+{
+ ASSERT_NOT_REACHED();
+}
+
+void CompositeEditCommand::doReapply()
+{
+ ASSERT_NOT_REACHED();
+}
+
+EditCommandComposition* CompositeEditCommand::ensureComposition()
+{
+ CompositeEditCommand* command = this;
+ while (command && command->parent())
+ command = command->parent();
+ if (!command->m_composition)
+ command->m_composition = EditCommandComposition::create(document(), startingSelection(), endingSelection());
+ return command->m_composition.get();
+}
+
//
// sugary-sweet convenience functions to help create and apply edit commands in composite commands
//
-void CompositeEditCommand::applyCommandToComposite(PassRefPtr<EditCommand> cmd)
+void CompositeEditCommand::applyCommandToComposite(PassRefPtr<EditCommand> prpCommand)
{
- cmd->setParent(this);
- cmd->apply();
- m_commands.append(cmd);
+ RefPtr<EditCommand> command = prpCommand;
+ command->setParent(this);
+ command->apply();
+ if (command->isSimpleEditCommand()) {
+ command->setParent(0);
+ ensureComposition()->append(toSimpleEditCommand(command.get()));
+ }
+ m_commands.append(command.release());
}
-void CompositeEditCommand::applyCommandToComposite(PassRefPtr<CompositeEditCommand> command, const VisibleSelection& selection)
+void CompositeEditCommand::applyCommandToComposite(PassRefPtr<CompositeEditCommand> prpCommand, const VisibleSelection& selection)
{
+ RefPtr<CompositeEditCommand> command = prpCommand;
command->setParent(this);
if (selection != command->endingSelection()) {
command->setStartingSelection(selection);
command->setEndingSelection(selection);
}
command->apply();
- m_commands.append(command);
+ if (command->isSimpleEditCommand()) {
+ command->setParent(0);
+ ensureComposition()->append(toSimpleEditCommand(command.get()));
+ }
+ m_commands.append(command.release());
}
void CompositeEditCommand::applyStyle(const EditingStyle* style, EditAction editingAction)
Modified: trunk/Source/WebCore/editing/CompositeEditCommand.h (102356 => 102357)
--- trunk/Source/WebCore/editing/CompositeEditCommand.h 2011-12-08 19:25:47 UTC (rev 102356)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.h 2011-12-08 19:32:17 UTC (rev 102357)
@@ -37,11 +37,31 @@
class StyledElement;
class Text;
+class EditCommandComposition : public EditCommand {
+public:
+ static PassRefPtr<EditCommandComposition> create(Document*, const VisibleSelection&, const VisibleSelection);
+
+ virtual void doApply() OVERRIDE;
+ virtual void doUnapply() OVERRIDE;
+ virtual void doReapply() OVERRIDE;
+ void append(SimpleEditCommand*);
+
+private:
+ EditCommandComposition(Document* document, const VisibleSelection& startingSelection, const VisibleSelection& endingSelection)
+ : EditCommand(document, startingSelection, endingSelection)
+ { }
+ virtual bool isEditCommandComposition() const OVERRIDE { return true; }
+
+ Vector<RefPtr<SimpleEditCommand> > m_commands;
+};
+
class CompositeEditCommand : public EditCommand {
public:
virtual ~CompositeEditCommand();
bool isFirstCommand(EditCommand* command) { return !m_commands.isEmpty() && m_commands.first() == command; }
+ EditCommandComposition* composition() { return m_composition.get(); }
+ EditCommandComposition* ensureComposition();
protected:
explicit CompositeEditCommand(Document*);
@@ -124,8 +144,26 @@
private:
virtual void doUnapply();
virtual void doReapply();
+
+ bool isCompositeEditCommand() const OVERRIDE { return true; }
+
+ RefPtr<EditCommandComposition> m_composition;
};
+inline EditCommandComposition* toEditCommandComposition(EditCommand* command)
+{
+ ASSERT(command);
+ ASSERT(command->isEditCommandComposition());
+ return static_cast<EditCommandComposition*>(command);
+}
+
+inline CompositeEditCommand* toCompositeEditCommand(EditCommand* command)
+{
+ ASSERT(command);
+ ASSERT(command->isCompositeEditCommand());
+ return static_cast<CompositeEditCommand*>(command);
+}
+
} // namespace WebCore
#endif // CompositeEditCommand_h
Modified: trunk/Source/WebCore/editing/DeleteButtonController.cpp (102356 => 102357)
--- trunk/Source/WebCore/editing/DeleteButtonController.cpp 2011-12-08 19:25:47 UTC (rev 102356)
+++ trunk/Source/WebCore/editing/DeleteButtonController.cpp 2011-12-08 19:32:17 UTC (rev 102357)
@@ -31,6 +31,7 @@
#include "CSSPrimitiveValue.h"
#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
+#include "CompositeEditCommand.h"
#include "DeleteButton.h"
#include "Document.h"
#include "Editor.h"
@@ -360,19 +361,40 @@
m_disableStack++;
}
+class RemoveTargetCommand : public CompositeEditCommand {
+public:
+ static PassRefPtr<RemoveTargetCommand> create(Document* document, PassRefPtr<Node> target)
+ {
+ return adoptRef(new RemoveTargetCommand(document, target));
+ }
+
+private:
+ RemoveTargetCommand(Document* document, PassRefPtr<Node> target)
+ : CompositeEditCommand(document)
+ , m_target(target)
+ { }
+
+ void doApply()
+ {
+ removeNode(m_target);
+ }
+
+private:
+ RefPtr<Node> m_target;
+};
+
void DeleteButtonController::deleteTarget()
{
if (!enabled() || !m_target)
return;
- RefPtr<Node> element = m_target;
hide();
// Because the deletion UI only appears when the selection is entirely
// within the target, we unconditionally update the selection to be
// a caret where the target had been.
- Position pos = positionInParentBeforeNode(element.get());
- applyCommand(RemoveNodeCommand::create(element.release()));
+ Position pos = positionInParentBeforeNode(m_target.get());
+ applyCommand(RemoveTargetCommand::create(m_frame->document(), m_target));
m_frame->selection()->setSelection(VisiblePosition(pos));
}
Modified: trunk/Source/WebCore/editing/EditCommand.cpp (102356 => 102357)
--- trunk/Source/WebCore/editing/EditCommand.cpp 2011-12-08 19:25:47 UTC (rev 102356)
+++ trunk/Source/WebCore/editing/EditCommand.cpp 2011-12-08 19:32:17 UTC (rev 102357)
@@ -40,7 +40,7 @@
namespace WebCore {
-EditCommand::EditCommand(Document* document)
+EditCommand::EditCommand(Document* document)
: m_document(document)
, m_parent(0)
{
@@ -50,6 +50,16 @@
setEndingSelection(m_startingSelection);
}
+EditCommand::EditCommand(Document* document, const VisibleSelection& startingSelection, const VisibleSelection& endingSelection)
+ : m_document(document)
+ , m_parent(0)
+{
+ ASSERT(m_document);
+ ASSERT(m_document->frame());
+ setStartingSelection(startingSelection);
+ setEndingSelection(endingSelection);
+}
+
EditCommand::~EditCommand()
{
}
@@ -62,6 +72,7 @@
Frame* frame = m_document->frame();
if (isTopLevelCommand()) {
+ ASSERT(isCompositeEditCommand());
if (!endingSelection().isContentRichlyEditable()) {
switch (editingAction()) {
case EditActionTyping:
@@ -76,6 +87,7 @@
return;
}
}
+ toCompositeEditCommand(this)->ensureComposition();
}
// Changes to the document may have been made since the last editing operation that
@@ -94,10 +106,11 @@
}
if (isTopLevelCommand()) {
+ ASSERT(isCompositeEditCommand());
// Only need to call appliedEditing for top-level commands, and TypingCommands do it on their
// own (see TypingCommand::typingAddedToOpenCommand).
if (!isTypingCommand())
- frame->editor()->appliedEditing(this);
+ frame->editor()->appliedEditing(toCompositeEditCommand(this));
}
setShouldRetainAutocorrectionIndicator(false);
@@ -122,8 +135,8 @@
doUnapply();
deleteButtonController->enable();
- if (isTopLevelCommand())
- frame->editor()->unappliedEditing(this);
+ if (isEditCommandComposition())
+ frame->editor()->unappliedEditing(toEditCommandComposition(this));
}
void EditCommand::reapply()
@@ -145,8 +158,8 @@
doReapply();
deleteButtonController->enable();
- if (isTopLevelCommand())
- frame->editor()->reappliedEditing(this);
+ if (isEditCommandComposition())
+ frame->editor()->reappliedEditing(toEditCommandComposition(this));
}
void EditCommand::doReapply()
@@ -159,10 +172,22 @@
return EditActionUnspecified;
}
+static inline EditCommandComposition* compositionIfPossible(EditCommand* command)
+{
+ if (!command->isCompositeEditCommand())
+ return 0;
+ return toCompositeEditCommand(command)->composition();
+}
+
void EditCommand::setStartingSelection(const VisibleSelection& s)
{
Element* root = s.rootEditableElement();
for (EditCommand* cmd = this; ; cmd = cmd->m_parent) {
+ if (EditCommandComposition* composition = compositionIfPossible(cmd)) {
+ ASSERT(cmd->isTopLevelCommand());
+ composition->m_startingSelection = s;
+ composition->m_startingRootEditableElement = root;
+ }
cmd->m_startingSelection = s;
cmd->m_startingRootEditableElement = root;
if (!cmd->m_parent || cmd->m_parent->isFirstCommand(cmd))
@@ -174,6 +199,11 @@
{
Element* root = s.rootEditableElement();
for (EditCommand* cmd = this; cmd; cmd = cmd->m_parent) {
+ if (EditCommandComposition* composition = compositionIfPossible(cmd)) {
+ ASSERT(cmd->isTopLevelCommand());
+ composition->m_endingSelection = s;
+ composition->m_endingRootEditableElement = root;
+ }
cmd->m_endingSelection = s;
cmd->m_endingRootEditableElement = root;
}
@@ -210,13 +240,15 @@
void EditCommand::setParent(CompositeEditCommand* parent)
{
- ASSERT(parent);
- ASSERT(!m_parent);
+ ASSERT((parent && !m_parent) || (!parent && m_parent));
+ ASSERT(!parent || !isCompositeEditCommand() || !toCompositeEditCommand(this)->composition());
m_parent = parent;
- m_startingSelection = parent->m_endingSelection;
- m_endingSelection = parent->m_endingSelection;
- m_startingRootEditableElement = parent->m_endingRootEditableElement;
- m_endingRootEditableElement = parent->m_endingRootEditableElement;
+ if (parent) {
+ m_startingSelection = parent->m_endingSelection;
+ m_endingSelection = parent->m_endingSelection;
+ m_startingRootEditableElement = parent->m_endingRootEditableElement;
+ m_endingRootEditableElement = parent->m_endingRootEditableElement;
+ }
}
void applyCommand(PassRefPtr<EditCommand> command)
Modified: trunk/Source/WebCore/editing/EditCommand.h (102356 => 102357)
--- trunk/Source/WebCore/editing/EditCommand.h 2011-12-08 19:25:47 UTC (rev 102356)
+++ trunk/Source/WebCore/editing/EditCommand.h 2011-12-08 19:32:17 UTC (rev 102357)
@@ -52,10 +52,13 @@
Element* startingRootEditableElement() const { return m_startingRootEditableElement.get(); }
Element* endingRootEditableElement() const { return m_endingRootEditableElement.get(); }
-
+
+ virtual bool isSimpleEditCommand() const { return false; }
+ virtual bool isCompositeEditCommand() const { return false; }
+ virtual bool isEditCommandComposition() const { return false; }
virtual bool isTypingCommand() const;
virtual bool isCreateLinkCommand() const;
-
+
virtual bool preservesTypingStyle() const;
bool isTopLevelCommand() const { return !m_parent; }
@@ -65,8 +68,10 @@
protected:
EditCommand(Document*);
+ EditCommand(Document*, const VisibleSelection&, const VisibleSelection&);
Document* document() const { return m_document.get(); }
+ CompositeEditCommand* parent() const { return m_parent; }
void setStartingSelection(const VisibleSelection&);
void setEndingSelection(const VisibleSelection&);
@@ -91,8 +96,17 @@
class SimpleEditCommand : public EditCommand {
protected:
SimpleEditCommand(Document* document) : EditCommand(document) { }
+private:
+ virtual bool isSimpleEditCommand() const OVERRIDE { return true; }
};
+inline SimpleEditCommand* toSimpleEditCommand(EditCommand* command)
+{
+ ASSERT(command);
+ ASSERT(command->isSimpleEditCommand());
+ return static_cast<SimpleEditCommand*>(command);
+}
+
void applyCommand(PassRefPtr<EditCommand>);
} // namespace WebCore
Modified: trunk/Source/WebCore/editing/Editor.cpp (102356 => 102357)
--- trunk/Source/WebCore/editing/Editor.cpp 2011-12-08 19:25:47 UTC (rev 102356)
+++ trunk/Source/WebCore/editing/Editor.cpp 2011-12-08 19:32:17 UTC (rev 102357)
@@ -865,7 +865,7 @@
endRoot->dispatchEvent(Event::create(eventNames().webkitEditableContentChangedEvent, false, false), ec);
}
-void Editor::appliedEditing(PassRefPtr<EditCommand> cmd)
+void Editor::appliedEditing(PassRefPtr<CompositeEditCommand> cmd)
{
m_frame->document()->updateLayout();
@@ -888,12 +888,12 @@
// different from the last command
m_lastEditCommand = cmd;
if (client())
- client()->registerCommandForUndo(m_lastEditCommand);
+ client()->registerCommandForUndo(toCompositeEditCommand(m_lastEditCommand.get())->ensureComposition());
}
respondToChangedContents(newSelection);
}
-void Editor::unappliedEditing(PassRefPtr<EditCommand> cmd)
+void Editor::unappliedEditing(PassRefPtr<EditCommandComposition> cmd)
{
m_frame->document()->updateLayout();
@@ -909,7 +909,7 @@
respondToChangedContents(newSelection);
}
-void Editor::reappliedEditing(PassRefPtr<EditCommand> cmd)
+void Editor::reappliedEditing(PassRefPtr<EditCommandComposition> cmd)
{
m_frame->document()->updateLayout();
Modified: trunk/Source/WebCore/editing/Editor.h (102356 => 102357)
--- trunk/Source/WebCore/editing/Editor.h 2011-12-08 19:25:47 UTC (rev 102356)
+++ trunk/Source/WebCore/editing/Editor.h 2011-12-08 19:32:17 UTC (rev 102357)
@@ -48,9 +48,10 @@
class CSSStyleDeclaration;
class Clipboard;
-class SpellingCorrectionController;
+class CompositeEditCommand;
class DeleteButtonController;
class EditCommand;
+class EditCommandComposition;
class EditorClient;
class EditorInternalCommand;
class Frame;
@@ -60,10 +61,11 @@
class Pasteboard;
class SimpleFontData;
class SpellChecker;
+class SpellingCorrectionController;
class Text;
class TextCheckerClient;
+class TextEvent;
struct TextCheckingResult;
-class TextEvent;
struct CompositionUnderline {
CompositionUnderline()
@@ -164,9 +166,9 @@
void applyStyleToSelection(CSSStyleDeclaration*, EditAction);
void applyParagraphStyleToSelection(CSSStyleDeclaration*, EditAction);
- void appliedEditing(PassRefPtr<EditCommand>);
- void unappliedEditing(PassRefPtr<EditCommand>);
- void reappliedEditing(PassRefPtr<EditCommand>);
+ void appliedEditing(PassRefPtr<CompositeEditCommand>);
+ void unappliedEditing(PassRefPtr<EditCommandComposition>);
+ void reappliedEditing(PassRefPtr<EditCommandComposition>);
void unappliedSpellCorrection(const VisibleSelection& selectionOfCorrected, const String& corrected, const String& correction);
void setShouldStyleWithCSS(bool flag) { m_shouldStyleWithCSS = flag; }