Fixed sometimes foucs ring disappear late and is not shown.
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / WebPageProxy.cpp
index c5becb1..cf2c174 100755 (executable)
@@ -1259,11 +1259,21 @@ void WebPageProxy::handleGestureEvent(const WebGestureEvent& event)
     if (!isValid())
         return;
 
-#if ENABLE(TIZEN_ISF_PORT)
+#if ENABLE(TIZEN_ISF_PORT) || ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
     if (event.type() == WebEvent::GestureSingleTap) {
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+        FocusRing* focusRing = ewkViewGetFocusRing(viewWidget());
+        if (focusRing) {
+            IntPoint tapPosition = EwkViewImpl::fromEvasObject(viewWidget())->transformToScene().mapPoint(event.position());
+            focusRing->requestToShow(tapPosition, true);
+        }
+#endif
+
+#if ENABLE(TIZEN_ISF_PORT)
         InputMethodContextEfl* inputMethodContext = static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->inputMethodContext();
         if (inputMethodContext)
             inputMethodContext->resetIMFContext();
+#endif
     }
 #endif
 
@@ -3808,8 +3818,21 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled)
         m_pageClient->doneWithGestureEvent(event, handled);
 #endif
 #if ENABLE(TIZEN_ISF_PORT)
-        if (type == WebEvent::GestureSingleTap)
+        if (m_isVisible && type == WebEvent::GestureSingleTap && m_editorState.isContentEditable) {
+#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+            if (m_editorState.inputMethodHints == "date"
+                || m_editorState.inputMethodHints == "datetime"
+                || m_editorState.inputMethodHints == "datetime-local"
+                || m_editorState.inputMethodHints == "month"
+                || m_editorState.inputMethodHints == "time"
+                || m_editorState.inputMethodHints == "week") {
+                InputMethodContextEfl* inputMethodContext = static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->inputMethodContext();
+                if (inputMethodContext->inputPickerType() == -1)
+                    break;
+            }
+#endif
             evas_object_focus_set(viewWidget(), true);
+        }
 #endif
         break;
     }