Fix keypad reopening issue
authorSangYong Park <sy302.park@samsung.com>
Thu, 11 Apr 2013 05:46:23 +0000 (14:46 +0900)
committerSangYong Park <sy302.park@samsung.com>
Thu, 11 Apr 2013 06:09:45 +0000 (15:09 +0900)
[Title] Fix key reopening issue
[Issue#] N_SE-33605 N_SE-33564
[Problem] Keypad did not show when tap focused node
[Cause] editor state information did not changed
[Solution] Notify editor state information forcely

Change-Id: If7c1a40e6184f82cd1d429eab7e70383faae2567

Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/FocusController.cpp
Source/WebKit2/UIProcess/efl/InputMethodContextEfl.cpp

index 6f4a70d..c1ed585 100755 (executable)
 #include "TizenLinkEffect.h"
 #endif
 
+#if ENABLE(TIZEN_ISF_PORT)
+#include "EditorClient.h"
+#endif
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -643,6 +647,10 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve
         swallowEvent = handleMousePressEventTripleClick(event);
     else
         swallowEvent = handleMousePressEventSingleClick(event);
+
+#if ENABLE(TIZEN_ISF_PORT)
+    m_frame->editor()->client()->respondToChangedSelection(m_frame);
+#endif
     
     m_mouseDownMayStartAutoscroll = m_mouseDownMayStartSelect
         || (m_mousePressNode && m_mousePressNode->renderBox() && m_mousePressNode->renderBox()->canBeProgramaticallyScrolled());
index a169d63..8b4b414 100755 (executable)
@@ -613,23 +613,12 @@ bool FocusController::setFocusedNode(Node* node, PassRefPtr<Frame> newFocusedFra
     
     Node* oldFocusedNode = oldDocument ? oldDocument->focusedNode() : 0;
 #if ENABLE(TIZEN_ISF_PORT)
-    if (oldFocusedNode == node) {
-        if (node && node->shouldUseInputMethod() && newFocusedFrame->eventHandler()->mousePressed()) {
-#if ENABLE(TIZEN_CLIPBOARD) || ENABLE(TIZEN_PASTEBOARD)
-            if (m_page->selection().isRange())
-                return true;
-#endif
-            m_page->editorClient()->setInputMethodState(true);
-        }
-        return true;
-    }
-
     // A variable to remember a desingMode state before focusing/bluring will change it.
     bool oldDesignMode = false;
-#else
+#endif
+
     if (oldFocusedNode == node)
         return true;
-#endif    //ENABLE(TIZEN_ISF_PORT)
 
     // FIXME: Might want to disable this check for caretBrowsing
     if (oldFocusedNode && oldFocusedNode->isRootEditableElement() && !relinquishesEditingFocus(oldFocusedNode))
index 96db072..cdd0035 100755 (executable)
@@ -65,8 +65,6 @@ void InputMethodContextEfl::onIMFInputPanelStateChanged(void* data, Ecore_IMF_Co
             inputMethodContext->m_viewImpl->pageClient->closeClipboardWindow();
 #endif
         evas_object_smart_callback_call(inputMethodContext->m_viewImpl->view(), "editorclient,ime,closed", 0);
-        if (inputMethodContext->m_context)
-            evas_object_focus_set(inputMethodContext->m_viewImpl->view(), false);
     } else if (state == ECORE_IMF_INPUT_PANEL_STATE_SHOW)
         evas_object_smart_callback_call(inputMethodContext->m_viewImpl->view(), "editorclient,ime,opened", 0);
 }
@@ -334,7 +332,7 @@ void InputMethodContextEfl::updateTextInputState()
         return;
 
     if (editor.isContentEditable && m_useInputMethod) {
-        if (m_focused)
+        if (m_state != ECORE_IMF_INPUT_PANEL_STATE_HIDE)
             return;
 
         Ewk_Settings* settings = ewk_view_settings_get(m_viewImpl->view());