Fix keypad issue of printer icon in google maps
authorSangYong Park <sy302.park@samsung.com>
Wed, 17 Apr 2013 10:01:34 +0000 (19:01 +0900)
committerGerrit Code Review <gerrit2@kim11>
Wed, 17 Apr 2013 10:56:52 +0000 (19:56 +0900)
[Title] Fix keypad issue of printer icon in google maps
[Issue#] N_SE-34799
[Problem] keypad did shown after tapping printer icon
[Cause] google maps focus to edit field on load, and prevent raise tap event.
        in this case, webkit show keypad.
[Solution] show keypad if tap edit field

Change-Id: Ia94708c5d3bc7452c340f0dc021c4d6baccbe14b

Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp
Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h
Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp

index a8998c6..596f44b 100755 (executable)
@@ -182,9 +182,6 @@ EwkViewImpl::EwkViewImpl(Evas_Object* view)
 #if USE(TILED_BACKING_STORE)
     , m_scaleFactor(1)
 #endif
-#if ENABLE(TIZEN_ISF_PORT)
-    , m_gestureTapState(GestureTapStateNone)
-#endif
 #endif // #if OS(TIZEN)
 {
     ASSERT(view);
index a36c492..02cd6cb 100755 (executable)
@@ -319,19 +319,6 @@ public:
 #if ENABLE(TOUCH_EVENTS) && ENABLE(TIZEN_GESTURE)
     void feedTouchEventsByType(Ewk_Touch_Event_Type);
 #endif
-
-#if ENABLE(TIZEN_ISF_PORT)
-    typedef enum {
-        GestureTapStateNone = 0x0,
-        GestureTapStateEnable = 0x1,
-        GestureTapStateDisable = 0x2,
-        GestureTapStateEndGesture = 0x4
-    } GestureTapState;
-
-    void initGestureTapState() { m_gestureTapState = GestureTapStateNone; }
-    void addGestureTapState(GestureTapState state) { m_gestureTapState |= state; }
-    unsigned gestureTapState() { return m_gestureTapState; }
-#endif
 #endif
 
     // FIXME: Make members private for encapsulation.
@@ -529,10 +516,6 @@ private:
     float m_scaleFactor;
     WebCore::IntPoint m_scrollPosition;
 #endif
-
-#if ENABLE(TIZEN_ISF_PORT)
-    unsigned m_gestureTapState;
-#endif
 #endif
 };
 
index 23739b7..68e8324 100755 (executable)
@@ -545,12 +545,6 @@ static Eina_Bool _ewk_view_smart_gesture_end(Ewk_View_Smart_Data* smartData, con
 #endif
 
             impl->gestureClient->endTap(IntPoint(event->position.x, event->position.y));
-
-#if ENABLE(TIZEN_ISF_PORT)
-            impl->addGestureTapState(EwkViewImpl::GestureTapStateEndGesture);
-            if (impl->gestureTapState() == (EwkViewImpl::GestureTapStateDisable | EwkViewImpl::GestureTapStateEndGesture))
-                evas_object_focus_set(smartData->self, true);
-#endif
         } else if (event->count == 2)
             impl->gestureClient->endDoubleTap(IntPoint(event->position.x, event->position.y));
         break;
@@ -4089,10 +4083,6 @@ void ewk_view_touch_event_handler_result_set(Evas_Object* ewkView, WebKit::WebEv
         // to prevent applications scrolling at the beginning of touch.
         impl->wasHandledTouchMove = true;
         evas_object_smart_callback_call(ewkView, "touchmove,handled", static_cast<void*>(&impl->wasHandledTouchMove));
-
-#if ENABLE(TIZEN_ISF_PORT)
-        impl->initGestureTapState();
-#endif
     } else if (type == WebEvent::TouchMove) {
         impl->gestureClient->setMovingEnabled(!wasHandled);
 
@@ -4110,11 +4100,15 @@ void ewk_view_touch_event_handler_result_set(Evas_Object* ewkView, WebKit::WebEv
             impl->gestureClient->setMovingEnabled(!wasHandled);
             impl->gestureClient->setTapEnabled(!wasHandled);
         }
-
 #if ENABLE(TIZEN_ISF_PORT)
-        impl->addGestureTapState(wasHandled ? EwkViewImpl::GestureTapStateDisable : EwkViewImpl::GestureTapStateEnable);
-        if (impl->gestureTapState() == (EwkViewImpl::GestureTapStateDisable | EwkViewImpl::GestureTapStateEndGesture))
-            evas_object_focus_set(ewkView, true);
+        else {
+            IntPoint pointForHitTest = impl->transformFromScene().mapPoint(IntPoint(impl->touchDownPoint.x, impl->touchDownPoint.y));
+            WebHitTestResult::Data hitTestResultData = impl->pageProxy->hitTestResultAtPoint(pointForHitTest);
+            if (hitTestResultData.isContentEditable && impl->inputMethodContext()) {
+                evas_object_focus_set(ewkView, true);
+                impl->inputMethodContext()->updateTextInputState();
+            }
+        }
 #endif
     }
 #endif
index f9ba8e8..4771f68 100755 (executable)
@@ -885,6 +885,7 @@ void WebPage::hitTestResultAtPoint(const IntPoint& point, int hitTestMode, WebHi
     hitTestResultData.absoluteMediaURL = hitTestResult.absoluteMediaURL().string();
     hitTestResultData.linkLabel = hitTestResult.textContent();
     hitTestResultData.linkTitle = hitTestResult.titleDisplayString();
+    hitTestResultData.isContentEditable = hitTestResult.isContentEditable();
 #if ENABLE(TIZEN_DRAG_SUPPORT)
     hitTestResultData.isDragSupport = hitTestResult.isDragSupport();
 #endif