Index: third_party/WebKit/Source/core/editing/InputMethodController.h |
diff --git a/third_party/WebKit/Source/core/editing/InputMethodController.h b/third_party/WebKit/Source/core/editing/InputMethodController.h |
index 2a36cd448c04744b1a4cd951af5f87b778700fef..cfe193f718754d3803e238e6bd88657f85c91af9 100644 |
--- a/third_party/WebKit/Source/core/editing/InputMethodController.h |
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.h |
@@ -57,15 +57,22 @@ public: |
bool hasComposition() const; |
void setComposition(const String&, const Vector<CompositionUnderline>&, int selectionStart, int selectionEnd); |
void setCompositionFromExistingText(const Vector<CompositionUnderline>&, unsigned compositionStart, unsigned compositionEnd); |
+ |
// Inserts the text that is being composed as a regular text and returns true |
// if composition exists. |
- bool confirmComposition(); |
+ bool replaceComposition(); |
aelias_OOO_until_Jul13
2016/08/25 02:50:57
I think the old name "confirmComposition" is bette
yabinh
2016/08/25 10:27:08
Done.
|
// Inserts the given text string in the place of the existing composition |
// and returns true. |
- bool confirmComposition(const String& text, ConfirmCompositionBehavior confirmBehavior = KeepSelection); |
+ bool replaceComposition(const String& text, ConfirmCompositionBehavior confirmBehavior = KeepSelection); |
aelias_OOO_until_Jul13
2016/08/25 02:50:57
This is the one I wanted to make private. AFAIK,
yabinh
2016/08/25 10:27:08
Default argument is removed.
This one is called i
aelias_OOO_until_Jul13
2016/08/25 22:43:15
The if/else logic in WebLocalFrameImpl::insertText
yabinh
2016/08/26 01:23:20
When |text| is empty, replaceComposition(const Str
aelias_OOO_until_Jul13
2016/08/26 02:08:59
Looks like WebLocalFrame::insertText actually is d
yabinh
2016/08/26 02:46:23
Yes. We can simply delete it. Perfect!
|
+ |
// Inserts the text that is being composed or specified non-empty text and |
- // returns true. |
- bool confirmCompositionOrInsertText(const String& text, ConfirmCompositionBehavior); |
+ // returns true. This will not change the selection. |
+ bool confirmComposition(const String& text); |
+ // Inserts the text that is being composed or specified non-empty text and |
+ // returns true. This will change the selection according to |
+ // relativeCursorPosition. |
+ bool confirmCompositionWithCursor(const String& text, int relativeCursorPosition); |
+ |
yabinh
2016/08/26 02:46:23
On a second thought, I think it's better to name t
aelias_OOO_until_Jul13
2016/08/26 05:58:59
Dunno, I find that too long and I think that metho
yabinh
2016/08/26 07:18:32
OK. I'll use commitComposition for now and ask yos
|
// Deletes the existing composition text. |
void cancelComposition(); |
void cancelCompositionIfSelectionIsInvalid(); |