diff options
Diffstat (limited to 'WebCore/editing/TypingCommand.h')
-rw-r--r-- | WebCore/editing/TypingCommand.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/WebCore/editing/TypingCommand.h b/WebCore/editing/TypingCommand.h index 17ea526..b4e1091 100644 --- a/WebCore/editing/TypingCommand.h +++ b/WebCore/editing/TypingCommand.h @@ -43,8 +43,8 @@ public: }; static void deleteSelection(Document*, bool smartDelete = false); - static void deleteKeyPressed(Document*, bool smartDelete = false, TextGranularity = CharacterGranularity); - static void forwardDeleteKeyPressed(Document*, bool smartDelete = false, TextGranularity = CharacterGranularity); + static void deleteKeyPressed(Document*, bool smartDelete = false, TextGranularity = CharacterGranularity, bool killRing = false); + static void forwardDeleteKeyPressed(Document*, bool smartDelete = false, TextGranularity = CharacterGranularity, bool killRing = false); static void insertText(Document*, const String&, bool selectInsertedText = false, bool insertedTextIsComposition = false); static void insertText(Document*, const String&, const Selection&, bool selectInsertedText = false, bool insertedTextIsComposition = false); static void insertLineBreak(Document*); @@ -61,17 +61,17 @@ public: void insertLineBreak(); void insertParagraphSeparatorInQuotedContent(); void insertParagraphSeparator(); - void deleteKeyPressed(TextGranularity); - void forwardDeleteKeyPressed(TextGranularity); - void deleteSelection(bool); + void deleteKeyPressed(TextGranularity, bool killRing); + void forwardDeleteKeyPressed(TextGranularity, bool killRing); + void deleteSelection(bool smartDelete); private: - static PassRefPtr<TypingCommand> create(Document* document, ETypingCommand command, const String& text = "", bool selectInsertedText = false, TextGranularity granularity = CharacterGranularity) + static PassRefPtr<TypingCommand> create(Document* document, ETypingCommand command, const String& text = "", bool selectInsertedText = false, TextGranularity granularity = CharacterGranularity, bool killRing = false) { - return adoptRef(new TypingCommand(document, command, text, selectInsertedText, granularity)); + return adoptRef(new TypingCommand(document, command, text, selectInsertedText, granularity, killRing)); } - TypingCommand(Document*, ETypingCommand, const String& text, bool selectInsertedText, TextGranularity); + TypingCommand(Document*, ETypingCommand, const String& text, bool selectInsertedText, TextGranularity, bool killRing); bool smartDelete() const { return m_smartDelete; } void setSmartDelete(bool smartDelete) { m_smartDelete = smartDelete; } @@ -91,6 +91,7 @@ private: bool m_selectInsertedText; bool m_smartDelete; TextGranularity m_granularity; + bool m_killRing; // Undoing a series of backward deletes will restore a selection around all of the // characters that were deleted, but only if the typing command being undone |