| Index: third_party/WebKit/Source/web/WebViewImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| index 6ffc29e0210fab3083320dae31fd12388a93f8ac..9ebcc0c0ebdac02c516a9a4c4c73935721a1c57a 100644
|
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| @@ -2370,25 +2370,28 @@ bool WebViewImpl::confirmComposition()
|
|
|
| bool WebViewImpl::confirmComposition(ConfirmCompositionBehavior selectionBehavior)
|
| {
|
| - return confirmComposition(WebString(), selectionBehavior);
|
| + return confirmComposition(WebString(), selectionBehavior, 1);
|
| }
|
|
|
| -bool WebViewImpl::confirmComposition(const WebString& text)
|
| +bool WebViewImpl::confirmComposition(const WebString& text, int relativeCaretPosition)
|
| {
|
| UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
|
| - return confirmComposition(text, DoNotKeepSelection);
|
| + return confirmComposition(text, DoNotKeepSelection, relativeCaretPosition);
|
| }
|
|
|
| -bool WebViewImpl::confirmComposition(const WebString& text, ConfirmCompositionBehavior selectionBehavior)
|
| +bool WebViewImpl::confirmComposition(const WebString& text, ConfirmCompositionBehavior selectionBehavior, int relativeCaretPosition)
|
| {
|
| LocalFrame* focused = focusedLocalFrameAvailableForIme();
|
| if (!focused)
|
| return false;
|
|
|
| if (WebPlugin* plugin = focusedPluginIfInputMethodSupported(focused))
|
| - return plugin->confirmComposition(text, selectionBehavior);
|
| + return plugin->confirmComposition(text, selectionBehavior, relativeCaretPosition);
|
|
|
| - return focused->inputMethodController().confirmCompositionOrInsertText(text, selectionBehavior == KeepSelection ? InputMethodController::KeepSelection : InputMethodController::DoNotKeepSelection);
|
| + if (selectionBehavior == KeepSelection)
|
| + return focused->inputMethodController().commitComposition(text);
|
| +
|
| + return focused->inputMethodController().commitCompositionAndMoveCaret(text, relativeCaretPosition);
|
| }
|
|
|
| bool WebViewImpl::compositionRange(size_t* location, size_t* length)
|
|
|