[Title] Show keypad only when tap event is handled.
[Issue#] N_SE-41795 WEB-3055
[Problem] Overhead occurs when key event is handled.
[Cause] Request keypad too often.
[Solution] Show keypad only when tap event is handled.
Change-Id: Ib7435abd17aceee73888733d8cf308f6fc5d2f32
encoder->encode(hasComposition);
#if ENABLE(TIZEN_ISF_PORT)
+ encoder->encode(isTapEventHandling);
encoder->encode(inputMethodContextID);
encoder->encode(inputMethodHints);
encoder->encode(surroundingText);
return false;
#if ENABLE(TIZEN_ISF_PORT)
+ if (!decoder->decode(result.isTapEventHandling))
+ return false;
+
if (!decoder->decode(result.inputMethodContextID))
return false;
, isInPasswordField(false)
, hasComposition(false)
#if ENABLE(TIZEN_ISF_PORT)
+ , isTapEventHandling(false)
, inputMethodContextID(0)
, cursorPosition(0)
#endif
bool isInPasswordField;
bool hasComposition;
#if ENABLE(TIZEN_ISF_PORT)
+ bool isTapEventHandling;
uintptr_t inputMethodContextID;
WTF::String inputMethodHints;
WTF::String surroundingText;
#endif
#if ENABLE(TIZEN_ISF_PORT)
- void setInputMethodState(bool active);
int getCursorOffset();
void getSurroundingTextAndCursorOffset(String&, int&);
WebCore::IntRect getSelectionRect(bool);
UpdateSpellingUIWithMisspelledWord(WTF::String misspelledWord)
UpdateSpellingUIWithGrammarString(WTF::String badGrammarPhrase, WebCore::GrammarDetail grammarDetail)
GetGuessesForWord(WTF::String word, WTF::String context) -> (Vector<WTF::String> guesses)
-#if ENABLE(TIZEN_ISF_PORT)
- SetInputMethodState(bool active);
-#endif
#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
TextChangeInTextField(WTF::String name, WTF::String value)
#endif
, m_focused(false)
#if ENABLE(TIZEN_ISF_PORT)
, m_contextID(0)
- , m_useInputMethod(false)
, m_state(ECORE_IMF_INPUT_PANEL_STATE_HIDE)
, m_inputPickerType(-1)
#endif
if (editor.shouldIgnoreCompositionSelectionChange || editor.updateEditorRectOnly)
return;
- if (editor.isContentEditable && m_useInputMethod)
+ if (editor.isContentEditable)
showIMFContext(editor);
else
hideIMFContext();
ecore_imf_context_input_panel_return_key_type_set(context, returnKeyType);
}
-void InputMethodContextEfl::setUseInputMethod(bool use)
-{
- m_useInputMethod = use;
- updateTextInputState();
-}
-
PassOwnPtr<Ecore_IMF_Context> InputMethodContextEfl::takeContext(uintptr_t contextID)
{
size_t i = m_contextList.size();
void InputMethodContextEfl::showIMFContext(const EditorState& editor)
{
- if (isShow() && m_contextID == editor.inputMethodContextID)
+ if (!editor.isTapEventHandling || (isShow() && m_contextID == editor.inputMethodContextID))
return;
Ewk_Settings* settings = ewk_view_settings_get(m_viewImpl->view());
Vector<std::pair<uintptr_t, OwnPtr<Ecore_IMF_Context> > > m_contextList;
uintptr_t m_contextID;
- bool m_useInputMethod;
int m_state;
WebCore::IntRect m_imeRect;
int m_inputPickerType;
#endif
#if ENABLE(TIZEN_ISF_PORT)
-void WebPageProxy::setInputMethodState(bool active)
-{
- InputMethodContextEfl* inputMethodContext = static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->inputMethodContext();
- if (!inputMethodContext)
- return;
-
- inputMethodContext->setUseInputMethod(active);
-}
-
int WebPageProxy::getCursorOffset()
{
if (!isValid())
void WebEditorClient::setInputMethodState(bool active)
{
-#if ENABLE(TIZEN_ISF_PORT)
- m_page->send(Messages::WebPageProxy::SetInputMethodState(active));
- return;
-#endif
notImplemented();
}
#endif
#if ENABLE(TIZEN_ISF_PORT)
+ result.isTapEventHandling = (currentEvent() && currentEvent()->type() == WebEvent::GestureSingleTap);
+
if (!result.shouldIgnoreCompositionSelectionChange && result.isContentEditable) {
result.inputMethodContextID = reinterpret_cast<uintptr_t>(rootEditableElement);