12012-10-09 Ryuan Choi <ryuan.choi@samsung.com>
2
3 [EFL][WK2] Add support for IMF composition
4 https://bugs.webkit.org/show_bug.cgi?id=89552
5
6 Reviewed by NOBODY (OOPS!).
7
8 Implemented basic IMF support.
9
10 * PlatformEfl.cmake:
11 * Shared/NativeWebKeyboardEvent.h:
12 (NativeWebKeyboardEvent):
13 (WebKit::NativeWebKeyboardEvent::isFiltered):
14 Added to determine whether current keyboard event is compositing.
15 * Shared/efl/NativeWebKeyboardEventEfl.cpp:
16 (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
17 * UIProcess/API/efl/PageClientImpl.cpp:
18 (WebKit::PageClientImpl::updateTextInputState):
19 Added to change input state.
20 * UIProcess/API/efl/PageClientImpl.h:
21 (PageClientImpl):
22 * UIProcess/API/efl/ewk_main.cpp:
23 (ewk_init): Called ecore_imf_init.
24 (ewk_shutdown): Called ecore_imf_shutdown.
25 * UIProcess/API/efl/ewk_view.cpp:
26 (_Ewk_View_Private_Data):
27 (_Ewk_View_Private_Data::_Ewk_View_Private_Data):
28 (_Ewk_View_Private_Data::~_Ewk_View_Private_Data):
29 (_ewk_view_smart_key_down): Modified to send keyboard event to IMF.
30 (_ewk_view_smart_mouse_up): Modified to reset input method context.
31 (_ewk_view_preedit_changed): Added to send composition string.
32 (_ewk_view_commit): Added to send a message that composition is finished.
33 (_ewk_view_imf_context_create): Added to create Ecore_IMF_Context.
34 (_ewk_view_imf_context_destroy): Added to destroy Ecore_IMF_Context.
35 (ewk_view_text_input_state_update): Added to update input state.
36 * UIProcess/API/efl/ewk_view_private.h:
37 * UIProcess/PageClient.h: Moved updateTextInputState() to share with EFL port.
38 (PageClient):
39 * UIProcess/WebPageProxy.cpp:
40 (WebKit::WebPageProxy::editorStateChanged):
41 Added PLATFORM(EFL) to call updateTextInputState()
42 * UIProcess/WebPageProxy.h:
43 (WebPageProxy):
44 * UIProcess/WebPageProxy.messages.in:
45 Added HandleInputMethodKeydown message to determine whether keydown is handled.
46 * UIProcess/efl/WebPageProxyEfl.cpp:
47 (WebKit::WebPageProxy::handleInputMethodKeydown):
48 Added to check whether input method handled keydown.
49 (WebKit::WebPageProxy::confirmComposition): Added to support composition.
50 (WebKit::WebPageProxy::setComposition): Ditto.
51 (WebKit::WebPageProxy::cancelComposition): Ditto.
52 * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
53 (WebKit::WebEditorClient::handleInputMethodKeydown):
54 Added to check whether input method handled keydown.
55 * WebProcess/WebPage/WebPage.h:
56 (WebPage):
57 * WebProcess/WebPage/WebPage.messages.in: Added messages to support composition.
58 * WebProcess/WebPage/efl/WebPageEfl.cpp:
59 (WebKit::targetFrameForEditing): Referenced from QT port to get focused frame.
60 (WebKit::WebPage::confirmComposition): Added to support composition.
61 (WebKit::WebPage::setComposition): Ditto.
62 (WebKit::WebPage::cancelComposition): Ditto.
63