diff options
author | Steve Block <steveblock@google.com> | 2011-05-18 13:36:51 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-05-24 15:38:28 +0100 |
commit | 2fc2651226baac27029e38c9d6ef883fa32084db (patch) | |
tree | e396d4bf89dcce6ed02071be66212495b1df1dec /Source/WebCore/editing/TypingCommand.h | |
parent | b3725cedeb43722b3b175aaeff70552e562d2c94 (diff) | |
download | external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2 |
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Source/WebCore/editing/TypingCommand.h')
-rw-r--r-- | Source/WebCore/editing/TypingCommand.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/Source/WebCore/editing/TypingCommand.h b/Source/WebCore/editing/TypingCommand.h index 284ebc0..b34bdc1 100644 --- a/Source/WebCore/editing/TypingCommand.h +++ b/Source/WebCore/editing/TypingCommand.h @@ -42,11 +42,17 @@ public: InsertParagraphSeparatorInQuotedContent }; + enum TextCompositionType { + TextCompositionNone, + TextCompositionUpdate, + TextCompositionConfirm + }; + static void deleteSelection(Document*, bool smartDelete = false); 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 VisibleSelection&, bool selectInsertedText = false, bool insertedTextIsComposition = false); + static void insertText(Document*, const String&, bool selectInsertedText = false, TextCompositionType = TextCompositionNone); + static void insertText(Document*, const String&, const VisibleSelection&, bool selectInsertedText = false, TextCompositionType = TextCompositionNone); static void insertLineBreak(Document*); static void insertParagraphSeparator(Document*); static void insertParagraphSeparatorInQuotedContent(Document*); @@ -64,14 +70,20 @@ public: void deleteKeyPressed(TextGranularity, bool killRing); void forwardDeleteKeyPressed(TextGranularity, bool killRing); void deleteSelection(bool smartDelete); + void setCompositionType(TextCompositionType type) { m_compositionType = type; } private: 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, killRing)); + return adoptRef(new TypingCommand(document, command, text, selectInsertedText, granularity, TextCompositionNone, killRing)); + } + + static PassRefPtr<TypingCommand> create(Document* document, ETypingCommand command, const String& text, bool selectInsertedText, TextCompositionType compositionType) + { + return adoptRef(new TypingCommand(document, command, text, selectInsertedText, CharacterGranularity, compositionType, false)); } - TypingCommand(Document*, ETypingCommand, const String& text, bool selectInsertedText, TextGranularity, bool killRing); + TypingCommand(Document*, ETypingCommand, const String& text, bool selectInsertedText, TextGranularity, TextCompositionType, bool killRing); bool smartDelete() const { return m_smartDelete; } void setSmartDelete(bool smartDelete) { m_smartDelete = smartDelete; } @@ -94,6 +106,7 @@ private: bool m_selectInsertedText; bool m_smartDelete; TextGranularity m_granularity; + TextCompositionType m_compositionType; bool m_killRing; bool m_preservesTypingStyle; |