[Qt][WK2] Commit the preedit string in the input method when focus is about to be...
authormichael.bruning@digia.com <michael.bruning@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2012 14:17:30 +0000 (14:17 +0000)
committermichael.bruning@digia.com <michael.bruning@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2012 14:17:30 +0000 (14:17 +0000)
commit7d6433cda59b433d147247bdea3a7c178702194c
tree5a91b76cf656dae700c86d86e43f3702027f4d78
parent0c56efe753b925980729c7f8072a8a2ca0731693
[Qt][WK2] Commit the preedit string in the input method when focus is about to be moved.
https://bugs.webkit.org/show_bug.cgi?id=97774

Reviewed by Kenneth Rohde Christiansen.

Implements the handler for willSetInputMethodState in WebKit2 in Qt.
This is needed to tell the input method instance in Qt to commit its
preedit content when the focus has moved to another node to prevent a
bug where the old preedit string was kept as the preedit string and
the editor moved focus back to the old node when continuing to enter
text via the input method.

This behavior is analog to the behavior of the QtQuick text input
elements.

* UIProcess/API/qt/raw/qrawwebview.cpp:
(QRawWebViewPrivate::handleWillSetInputMethodState):
* UIProcess/API/qt/raw/qrawwebview_p_p.h:
(QRawWebViewPrivate):
* UIProcess/PageClient.h:
(PageClient):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtPageClient.cpp:
(WebKit::QtPageClient::handleWillSetInputMethodState):
(WebKit):
* UIProcess/qt/QtPageClient.h:
(QtPageClient):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(WebKit::QtWebPageEventHandler::handleWillSetInputMethodState):
(WebKit):
* UIProcess/qt/QtWebPageEventHandler.h:
(QtWebPageEventHandler):
* UIProcess/qt/WebPageProxyQt.cpp:
(WebKit::WebPageProxy::willSetInputMethodState):
(WebKit):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::willSetInputMethodState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@136126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp
Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p_p.h
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/qt/QtPageClient.cpp
Source/WebKit2/UIProcess/qt/QtPageClient.h
Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp
Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h
Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp