Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Unified Diff: third_party/WebKit/Source/core/editing/InputMethodController.h

Issue 1995333002: Handle newCursorPosition correctly for Android's commitText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: For compile error. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..17a2668afee01be334b89dc85cd1c0a91a10ccca 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodController.h
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.h
@@ -57,15 +57,18 @@ 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();
- // Inserts the given text string in the place of the existing composition
- // and returns true.
- bool confirmComposition(const String& text, ConfirmCompositionBehavior confirmBehavior = KeepSelection);
// 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 commitComposition(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 commitCompositionWithCursor(const String& text, int relativeCursorPosition);
yosin_UTC9 2016/08/26 10:06:11 |commitCompositionAndMoveCaret|?
yabinh 2016/08/29 05:49:53 Done.
+
// Deletes the existing composition text.
void cancelComposition();
void cancelCompositionIfSelectionIsInvalid();
@@ -111,6 +114,10 @@ private:
String composingText() const;
void selectComposition() const;
bool setSelectionOffsets(const PlainTextRange&, FrameSelection::SetSelectionOptions = FrameSelection::CloseTyping);
+ bool insertText(const String&);
+ // Inserts the given text string in the place of the existing composition
+ // and returns true.
+ bool replaceComposition(const String& text, ConfirmCompositionBehavior confirmBehavior);
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698