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

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

Issue 2568093003: Support parsing BackgroundSpans and UnderlineSpans in Android IME's commitText() (Closed)
Patch Set: Attempt to fix dependency error with target Created 4 years 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 20ce266d8a3b86b055f5cf7f3a7ee873671cf8d2..69fe719972c6a56cc5c0f960cce42c8c8648310c 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodController.h
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.h
@@ -62,18 +62,20 @@ class CORE_EXPORT InputMethodController final
// international text input composition
bool hasComposition() const;
- void setComposition(const String&,
- const Vector<CompositionUnderline>&,
+ void setComposition(const String& text,
+ const Vector<CompositionUnderline>& underlines,
int selectionStart,
int selectionEnd);
- void setCompositionFromExistingText(const Vector<CompositionUnderline>&,
+ void setCompositionFromExistingText(const Vector<CompositionUnderline>& text,
unsigned compositionStart,
unsigned compositionEnd);
// Deletes ongoing composing text if any, inserts specified text, and
// changes the selection according to relativeCaretPosition, which is
// relative to the end of the inserting text.
- bool commitText(const String& text, int relativeCaretPosition);
+ bool commitText(const String& text,
+ const Vector<CompositionUnderline>& underlines,
+ int relativeCaretPosition);
// Inserts ongoing composing text; changes the selection to the end of
// the inserting text if DoNotKeepSelection, or holds the selection if
@@ -128,15 +130,24 @@ class CORE_EXPORT InputMethodController final
const PlainTextRange&,
FrameSelection::SetSelectionOptions = FrameSelection::CloseTyping);
+ void addCompositionUnderlines(const Vector<CompositionUnderline>& underlines,
+ ContainerNode* rootEditableElement,
+ unsigned offset);
+
bool insertText(const String&);
- bool insertTextAndMoveCaret(const String&, int relativeCaretPosition);
+ bool insertTextAndMoveCaret(const String&,
+ int relativeCaretPosition,
+ const Vector<CompositionUnderline>& underlines);
// Inserts the given text string in the place of the existing composition.
// Returns true if did replace.
bool replaceComposition(const String& text);
// Inserts the given text string in the place of the existing composition
// and moves caret. Returns true if did replace and moved caret successfully.
- bool replaceCompositionAndMoveCaret(const String&, int relativeCaretPosition);
+ bool replaceCompositionAndMoveCaret(
+ const String&,
+ int relativeCaretPosition,
+ const Vector<CompositionUnderline>& underlines);
// Returns true if moved caret successfully.
bool moveCaret(int newCaretPosition);

Powered by Google App Engine
This is Rietveld 408576698