#endif
#if ENABLE(TIZEN_ISF_PORT)
-void InputMethodContextEfl::initializeIMFContext(Ecore_IMF_Context* context, Ecore_IMF_Input_Panel_Layout layout, int layoutVariation)
+void InputMethodContextEfl::initializeIMFContext(Ecore_IMF_Context* context, Ecore_IMF_Input_Panel_Layout layout, int layoutVariation, Ecore_IMF_Input_Panel_Return_Key_Type returnKeyType)
{
ecore_imf_context_input_panel_enabled_set(context, false);
ecore_imf_context_input_panel_event_callback_add(context, ECORE_IMF_INPUT_PANEL_STATE_EVENT, onIMFInputPanelStateChanged, this);
ecore_imf_context_input_panel_layout_set(context, layout);
if (layoutVariation >= 0)
ecore_imf_context_input_panel_layout_variation_set(context, layoutVariation);
+ ecore_imf_context_input_panel_return_key_type_set(context, returnKeyType);
}
void InputMethodContextEfl::setUseInputMethod(bool use)
const String& type = editor.inputMethodHints;
Ecore_IMF_Input_Panel_Layout layout;
int layoutVariation = -1;
+ Ecore_IMF_Input_Panel_Return_Key_Type returnKeyType = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
if (type == "number") {
layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY;
layout = ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER;
else if (type == "password")
layout = ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD;
- else
+ else {
layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
+ if (type == "search")
+ returnKeyType = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH;
+ }
OwnPtr<Ecore_IMF_Context> context;
if (m_contextID == editor.inputMethodContextID)
if (!context) {
context = createIMFContext(evas_object_evas_get(m_viewImpl->view()));
- initializeIMFContext(context.get(), layout, layoutVariation);
+ initializeIMFContext(context.get(), layout, layoutVariation, returnKeyType);
}
revertIMFContext();
static void onIMFPreeditSequenceChanged(void* data, Ecore_IMF_Context*, void* eventInfo);
#if ENABLE(TIZEN_ISF_PORT)
- void initializeIMFContext(Ecore_IMF_Context*, Ecore_IMF_Input_Panel_Layout, int);
+ void initializeIMFContext(Ecore_IMF_Context*, Ecore_IMF_Input_Panel_Layout, int, Ecore_IMF_Input_Panel_Return_Key_Type);
static void onIMFInputPanelStateChanged(void*, Ecore_IMF_Context*, int);
static void onIMFInputPanelGeometryChanged(void*, Ecore_IMF_Context*, int);
result.inputMethodHints = "decimalNumber";
else
result.inputMethodHints = "number";
- } else
+ } else if (type == "text" && formControl->form() && equalIgnoringCase(formControl->form()->fastGetAttribute(HTMLNames::roleAttr), "search"))
+ result.inputMethodHints = "search";
+ else
result.inputMethodHints = type;
result.surroundingText = formControl->value();