Revert "Revert "Revert "Fix the problem that the screen of the application does not...
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / API / efl / ewk_view.cpp
index 8ebc719..a357e8d 100755 (executable)
@@ -108,8 +108,8 @@ namespace EGL {
 
 #if ENABLE(TIZEN_GEOLOCATION)
 #include "ewk_geolocation_private.h"
+#include "ewk_geolocation_provider_private.h"
 #include "ewk_security_origin.h"
-#include "ewk_view_geolocation_provider.h"
 #endif
 
 #if ENABLE(TOUCH_EVENTS)
@@ -246,11 +246,6 @@ void _ewk_orientation_unlock(Ewk_View_Smart_Data *sd);
 static Eina_Bool _ewk_view_input_picker_show(Ewk_View_Smart_Data*, Ewk_Input_Type, const char* inputValue);
 #endif
 
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-static Eina_Bool _ewk_view_data_list_show(Ewk_View_Smart_Data*, Ewk_Input_Type, Eina_List*);
-static Eina_Bool _ewk_view_data_list_hide(Ewk_View_Smart_Data*, Ewk_Input_Type);
-#endif
-
 #if ENABLE(TIZEN_INPUT_COLOR_PICKER)
 static Eina_Bool _ewk_input_picker_color_request(Ewk_View_Smart_Data*, int, int, int, int);
 static Eina_Bool _ewk_input_picker_color_dismiss(Ewk_View_Smart_Data*);
@@ -280,6 +275,17 @@ static void _ewk_view_on_favicon_changed(const char* pageURL, void* eventInfo)
 }
 #endif
 
+#if ENABLE(TIZEN_GEOLOCATION)
+static Eina_Bool _ewk_view_geolocation_validity_check(void* eventInfo)
+{
+    Evas_Object* ewkView = static_cast<Evas_Object*>(eventInfo);
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, true);
+    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, true);
+
+    return impl->isValidLocationService();
+}
+#endif
+
 // Default Event Handling.
 static Eina_Bool _ewk_view_smart_focus_in(Ewk_View_Smart_Data* smartData)
 {
@@ -379,16 +385,38 @@ static Eina_Bool _ewk_view_smart_mouse_move(Ewk_View_Smart_Data* smartData, cons
     return true;
 }
 
+#if ENABLE(TIZEN_FOCUS_UI)
+bool isFocusUIActivationKeyname(const char* key)
+{
+    return !strcmp(key, "Up") || !strcmp(key, "Down") || !strcmp(key, "Left") || !strcmp(key, "Right") || !strcmp(key, "Tab");
+}
+#endif
+
 static Eina_Bool _ewk_view_smart_key_down(Ewk_View_Smart_Data* smartData, const Evas_Event_Key_Down* downEvent)
 {
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
+#if ENABLE(TIZEN_FOCUS_UI)
+    if (InputMethodContextEfl::shouldUseExternalKeyboard() && !impl->page()->focusUIEnabled()) {
+        if (isFocusUIActivationKeyname(downEvent->keyname))
+            impl->page()->setFocusUIEnabled(true);
+        return false;
+    }
+#endif
+
     bool isFiltered = false;
     InputMethodContextEfl* inputMethodContext = impl->inputMethodContext();
     if (inputMethodContext)
         inputMethodContext->handleKeyDownEvent(downEvent, &isFiltered);
 
+#if ENABLE(TIZEN_ISF_PORT)
+    NativeWebKeyboardEvent nativeEvent(downEvent, isFiltered);
+    nativeEvent.setInputMethodContextID(impl->pageProxy->editorState().inputMethodContextID);
+    impl->pageProxy->handleKeyboardEvent(nativeEvent);
+#else
     impl->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(downEvent, isFiltered));
+#endif
+
     return true;
 }
 
@@ -396,6 +424,11 @@ static Eina_Bool _ewk_view_smart_key_up(Ewk_View_Smart_Data* smartData, const Ev
 {
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
+#if ENABLE(TIZEN_FOCUS_UI)
+    if (InputMethodContextEfl::shouldUseExternalKeyboard() && !impl->page()->focusUIEnabled())
+        return false;
+#endif
+
     impl->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(upEvent));
     return true;
 }
@@ -414,18 +447,17 @@ static Eina_Bool _ewk_view_smart_gesture_start(Ewk_View_Smart_Data* smartData, c
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
     FocusRing* focusRing = impl->focusRing();
     if (focusRing) {
-        if (event->type == EWK_GESTURE_TAP && event->count == 1) {
-            focusRing->requestToShow(IntPoint(event->position.x, event->position.y));
+        if (event->type == EWK_GESTURE_TAP) {
+            if (event->count == 1)
+                focusRing->requestToShow(IntPoint(event->position.x, event->position.y));
         } else if (event->type == EWK_GESTURE_PAN) {
             if (impl->exceedTouchMoveThreshold)
                 focusRing->requestToHide();
-        } else {
-            if (event->type != EWK_GESTURE_LONG_PRESS) {
+        } else if (event->type != EWK_GESTURE_LONG_PRESS) {
 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
-                if (!impl->pageClient->isContextMenuVisible())
+            if (!impl->pageClient->isContextMenuVisible())
 #endif
-                    focusRing->requestToHide();
-            }
+                focusRing->requestToHide();
         }
     }
 #endif
@@ -704,7 +736,8 @@ Eina_Bool _ewk_view_smart_fullscreen_enter(Ewk_View_Smart_Data* smartData)
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
     ewk_view_main_frame_scrollbar_visible_set(impl->view(), false);
-    evas_object_smart_callback_call(impl->view(), "fullscreen,enterfullscreen", 0);
+    bool isNeed = impl->page()->fullScreenManager()->exitFullScreenByHwBackKey();
+    evas_object_smart_callback_call(impl->view(), "fullscreen,enterfullscreen", &isNeed);
     return true;
 }
 
@@ -888,6 +921,16 @@ static void _ewk_view_smart_del(Evas_Object* ewkView)
     if (smartData && smartData->priv && smartData->priv->inputPicker->isColorPickerShown())
         ewk_view_color_picker_color_set(ewkView, 0, 0, 0, 0);
 #endif
+
+#if ENABLE(TIZEN_GEOLOCATION)
+    if (smartData) {
+        EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+        Ewk_Geolocation_Provider* geolocationProvider = impl->context->geolocationProvider();
+        TIZEN_LOGI("_ewk_view_smart_del:: unwatch validity");
+        geolocationProvider->unwatchValidity(ewkView);
+    }
+#endif
+
     if (smartData && smartData->priv)
         _ewk_view_impl_del(smartData->priv);
 
@@ -908,17 +951,8 @@ static void _ewk_view_smart_resize(Evas_Object* ewkView, Evas_Coord width, Evas_
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
     evas_object_image_native_surface_set(smartData->image, 0);
 
-#if ENABLE(TIZEN_WEBKIT2_VIEW_VISIBILITY)
-    if (impl->pageClient->isVisible()) {
-        Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
-        impl->pageClient->updateViewportSize(IntSize(width, height), ecore_evas_rotation_get(ee));
-    } else
-        impl->pageClient->setDeferUpdateViewportSize(true);
-#else
     Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
     impl->pageClient->updateViewportSize(IntSize(width, height), ecore_evas_rotation_get(ee));
-#endif
-
 #if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
     if (!ewk_view_is_opengl_backend(ewkView))
         _ewk_view_composite(smartData);
@@ -988,12 +1022,6 @@ static void _ewk_view_smart_calculate(Evas_Object* ewkView)
 #endif
 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE) && !ENABLE(TIZEN_WEBKIT2_EFL_WTR)
                 Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
-                int newAngle = ecore_evas_rotation_get(ee);
-#if ENABLE(TIZEN_WEBKIT2_VIEW_VISIBILITY)
-                if (impl->pageClient->deferUpdateViewportSize()) {
-                    impl->pageClient->updateViewportSize(IntSize(width, height), newAngle);
-                }
-#endif
                 impl->pageClient->updateVisibleContentRectSize(IntSize(width, height));
                 if (ewk_view_is_opengl_backend(ewkView))
                     impl->pageClient->displayViewport();
@@ -1020,7 +1048,10 @@ static void _ewk_view_smart_calculate(Evas_Object* ewkView)
         impl->pageClient->frameRectChanged();
 #endif
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-        impl->pageClient->updateTextSelectionHandlesAndContextMenu(true);
+        if (impl->pageClient->isTextSelectionMode()) {
+            impl->pageClient->updateTextSelectionHandlesAndContextMenu(false);
+            impl->pageClient->requestToShowTextSelectionHandlesAndContextMenu();
+        }
 #endif
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
         if (impl->focusRing())
@@ -1152,10 +1183,6 @@ Eina_Bool ewk_view_smart_class_set(Ewk_View_Smart_Class* api)
 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
     api->input_picker_show = _ewk_view_input_picker_show;
 #endif
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-    api->data_list_show = _ewk_view_data_list_show;
-    api->data_list_hide = _ewk_view_data_list_hide;
-#endif
 #if ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT_INTERNAL)
     api->orientation_lock = _ewk_orientation_lock;
     api->orientation_unlock = _ewk_orientation_unlock;
@@ -1258,7 +1285,8 @@ static void _ewk_view_initialize(Evas_Object* ewkView, PassRefPtr<Ewk_Context> c
     ewkViewTizenClientAttachClient(ewkView);
 
 #if ENABLE(TIZEN_GEOLOCATION)
-    ewkViewGeolocationProviderAttachProvider(ewkView, impl->context->wkContext());
+    Ewk_Geolocation_Provider* geolocationProvider = impl->context->geolocationProvider();
+    geolocationProvider->watchValidity(GeolocationValidityCallbackData(_ewk_view_geolocation_validity_check, ewkView));
 #endif
 
 #if ENABLE(TIZEN_NOTIFICATIONS)
@@ -1722,13 +1750,18 @@ void ewk_view_text_change_in_textfield(Evas_Object* ewkView, const String& name,
     smartData->api->formdata_candidate_show(smartData, inputFieldRect.x(), inputFieldRect.y(), inputFieldRect.width(), inputFieldRect.height());
 }
 
-void ewk_view_form_data_add(Evas_Object* ewkView, WKDictionaryRef& formData, bool isPasswordForm)
+void ewk_view_form_data_add(Evas_Object* ewkView, WKDictionaryRef& formData, bool isPasswordForm, bool isAutoComplete)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
     if (!ewk_settings_autofill_password_form_enabled_get(ewk_view_settings_get(ewkView))
         && !ewk_settings_form_candidate_data_enabled_get(ewk_view_settings_get(ewkView)))
         return;
+
+    // if isAutoComplete is off then return
+    if (isPasswordForm && !isAutoComplete)
+        return;
+
     ewk_view_context_get(ewkView)->addFormData(impl->url(), formData, isPasswordForm);
 }
 
@@ -1746,18 +1779,17 @@ void ewk_view_form_password_data_fill(Evas_Object* ewkView)
     if (!passwordFormData.size())
         return;
 
-    String passwordFormAutofill = String::fromUTF8("try { function passwordFormAutofill() { var inputFields;");
+    String passwordFormAutofill = "try { function passwordFormAutofill() { var inputFields;";
     for (size_t i = 0; i < passwordFormData.size(); i++) {
-        passwordFormAutofill += String::fromUTF8(" inputFields = document.getElementsByName(\"");
-        passwordFormAutofill += passwordFormData[i].first;
-        passwordFormAutofill += String::fromUTF8("\");");
-        passwordFormAutofill += String::fromUTF8(" for (var i = 0; i < inputFields.length; i++)");
-        passwordFormAutofill += String::fromUTF8(" if (inputFields[i].tagName.toLowerCase() == \"input\" && (inputFields[i].type.toLowerCase() == \"text\" || inputFields[i].type.toLowerCase() == \"password\" || inputFields[i].type.toLowerCase() == \"email\"))");
-        passwordFormAutofill += String::fromUTF8(" inputFields[i].value = \"");
-        passwordFormAutofill += passwordFormData[i].second;
-        passwordFormAutofill += String::fromUTF8("\";");
+        passwordFormAutofill += String::format(" inputFields = document.getElementsByName(\"%s\");"
+            " for (var i = 0; i < inputFields.length; i++)"
+            " if (inputFields[i].tagName.toLowerCase() == \"input\" && (inputFields[i].type.toLowerCase() == \"text\" || inputFields[i].type.toLowerCase() == \"password\" || inputFields[i].type.toLowerCase() == \"email\")"
+            " && inputFields[i].autocomplete.toLowerCase() != \"off\")"
+            " inputFields[i].value = \"",passwordFormData[i].first.utf8().data());
+            passwordFormAutofill.append(passwordFormData[i].second);
+            passwordFormAutofill += "\";";
     }
-    passwordFormAutofill += String::fromUTF8("} passwordFormAutofill(); } catch(e) { }");
+    passwordFormAutofill += "} passwordFormAutofill(); } catch(e) { }";
     ewk_view_script_execute(ewkView, passwordFormAutofill.utf8().data(), 0, 0);
 }
 
@@ -1954,24 +1986,6 @@ static Eina_Bool _ewk_view_input_picker_show(Ewk_View_Smart_Data* smartData, Ewk
 }
 #endif
 
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-static Eina_Bool _ewk_view_data_list_show(Ewk_View_Smart_Data* smartData, Ewk_Input_Type inputType, Eina_List* optionList)
-{
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-
-    impl->inputPicker->showDataList(inputType, optionList);
-    return true;
-}
-
-static Eina_Bool _ewk_view_data_list_hide(Ewk_View_Smart_Data* smartData, Ewk_Input_Type inputType)
-{
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
-
-    impl->inputPicker->hideDataList(inputType);
-    return true;
-}
-#endif
-
 #if ENABLE(TIZEN_INPUT_COLOR_PICKER)
 static Eina_Bool _ewk_input_picker_color_request(Ewk_View_Smart_Data* smartData, int r, int g, int b, int a)
 {
@@ -2050,7 +2064,7 @@ void ewkViewLoadCommitted(Evas_Object* ewkView)
 #endif
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
     if (impl->focusRing())
-        impl->focusRing()->hide();
+        impl->focusRing()->hide(false);
 #endif
 #if ENABLE(TIZEN_ISF_PORT)
     impl->inputMethodContext()->hideIMFContext();
@@ -2360,31 +2374,6 @@ void ewkViewDeleteGeolocationPermission(Evas_Object* ewkView, Ewk_Geolocation_Pe
 
     impl->geolocationPermissionRequests = eina_list_remove(impl->geolocationPermissionRequests, geolocationPermissionRequest);
 }
-
-void ewkViewSetGeolocation(Evas_Object* ewkView, Ewk_Geolocation* geolocation)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-
-    impl->geolocation = geolocation;
-}
-
-Ewk_Geolocation* ewkViewGetGeolocation(Evas_Object* ewkView)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
-
-    return impl->geolocation;
-}
-
-bool ewkViewIsValidLocationService(Evas_Object* ewkView)
-{
-    TIZEN_LOGI("geolocation,valid");
-
-    bool valid = true;
-    evas_object_smart_callback_call(ewkView, "geolocation,valid", &valid);
-    return valid;
-}
 #endif
 
 void ewkViewFormSubmit(Evas_Object* ewkView, Ewk_Form_Data* formData)
@@ -2526,7 +2515,7 @@ void ewk_view_scale_range_get(Evas_Object* ewkView, double* minimumScale, double
         *maximumScale = constraints.maximumScale;
 }
 
-bool ewk_view_focused_node_adjust(Evas_Object* ewkView, Eina_Bool adjustForExternalKeyboard)
+bool ewk_view_focused_node_adjust(Evas_Object* ewkView, Eina_Bool adjustForExternalKeyboard, Eina_Bool adjustForContentSizeChanged)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
@@ -2542,7 +2531,8 @@ bool ewk_view_focused_node_adjust(Evas_Object* ewkView, Eina_Bool adjustForExter
 
     if ((!(static_cast<PageClient*>(impl->pageClient.get()))->isViewFocused()
         || (!adjustForExternalKeyboard && !impl->inputMethodContext())
-        || (!adjustForExternalKeyboard && !impl->inputMethodContext()->isShow()))
+        || (!adjustForContentSizeChanged && impl->pageProxy->editorState().isContentRichlyEditable)
+        || (adjustForContentSizeChanged && !impl->inputMethodContext()->isShow()))
 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
         && !(impl->pageClient->isClipboardWindowOpened())
 #endif
@@ -2550,16 +2540,40 @@ bool ewk_view_focused_node_adjust(Evas_Object* ewkView, Eina_Bool adjustForExter
         return false;
 #endif
 
+    double scaleFactor = impl->pageClient->scaleFactor();
+    IntSize contentsSize = impl->pageProxy->contentsSize();
+
+    double newScaleFactor = scaleFactor;
+    // Readable zoom value is dependent on device DPI
+    if (scaleFactor < impl->pageProxy->deviceScaleFactor()
+        && impl->pageClient->viewportConstraints().userScalable)
+        newScaleFactor = impl->pageProxy->deviceScaleFactor();
+
+    // Readable zoom value should be inside of viewport scale range
+    newScaleFactor = impl->pageClient->adjustScaleWithViewport(newScaleFactor);
+
     // caret position can be outside of visible rect.
     // we need to consider it.
     IntRect selectionRect = impl->pageProxy->editorState().selectionRect;
     IntRect focusedNodeRect = impl->pageClient->focusedNodeRect();
+    IntRect focusedNodeRectScaled = focusedNodeRect;
 
     if (selectionRect.isEmpty())
         return false;
 
+#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
+    focusedNodeRectScaled.scale(newScaleFactor);
+#else
+    focusedNodeRectScaled.scale(newScaleFactor / scaleFactor);
+#endif
+
+    IntRect visibleRect = impl->pageClient->visibleContentRect();
+    if (visibleRect.contains(focusedNodeRectScaled))
+        return false;
+
 #if ENABLE(TIZEN_WEBKIT2_INPUT_FIELD_ZOOM)
-    impl->inputFieldZoom->startInputFieldZoom(impl->transformFromScene().mapPoint(IntPoint(focusedNodeRect.x(), focusedNodeRect.y())) ,focusedNodeRect);
+    impl->inputFieldZoom->startInputFieldZoom(impl->transformFromScene().mapPoint(IntPoint(selectionRect.x(), selectionRect.y()))
+    , IntRect(focusedNodeRect.x(), selectionRect.y(), focusedNodeRect.width(), selectionRect.height()));
 #endif
 
     return true;
@@ -3955,7 +3969,8 @@ Eina_Bool ewk_view_text_selection_range_get(Evas_Object* ewkView, Eina_Rectangle
 
     IntRect leftSelectionRect;
     IntRect rightSelectionRect;
-    if (!impl->pageProxy->getSelectionHandlers(leftSelectionRect, rightSelectionRect)) {
+    int selectionDirection = 1;
+    if (!impl->pageProxy->getSelectionHandlers(leftSelectionRect, rightSelectionRect, selectionDirection)) {
         leftRect->x = 0;
         leftRect->y = 0;
         leftRect->w = 0;
@@ -4006,7 +4021,7 @@ Eina_Bool ewk_view_auto_clear_text_selection_mode_get(Evas_Object* ewkView)
     return ewk_settings_clear_text_selection_automatically_get(ewk_view_settings_get(ewkView));
 }
 
-Eina_Bool ewk_view_text_selection_range_clear(Evas_Object* ewkView)
+Eina_Bool ewk_view_text_selection_clear(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
@@ -4015,6 +4030,11 @@ Eina_Bool ewk_view_text_selection_range_clear(Evas_Object* ewkView)
     impl->pageClient->setIsTextSelectionMode(false);
     return isTextSelectionMode;
 }
+
+Eina_Bool ewk_view_text_selection_range_clear(Evas_Object* ewkView)
+{
+    return ewk_view_text_selection_clear(ewkView);
+}
 #endif // #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
 
 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
@@ -4045,6 +4065,16 @@ void ewkViewGetWindowFrame(Evas_Object* ewkView, int *x, int *y, int *w, int *h)
 }
 #endif
 
+void ewk_view_current_target_input_element_value_set(Evas_Object* ewkView, const char* value)
+{
+#if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+
+    impl->pageProxy->setCurrentTargetInputElementValue(String::fromUTF8(value));
+#endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
+}
+
 void ewk_view_focused_input_element_value_set(Evas_Object* ewkView, const char* value)
 {
 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION)
@@ -4068,51 +4098,6 @@ const char* ewk_view_focused_input_element_value_get(Evas_Object* ewkView)
 #endif // ENABLE(TIZEN_INPUT_TAG_EXTENSION)
 }
 
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-void ewkViewDataListShowRequest(Evas_Object* ewkView, Ewk_Input_Type inputType, Vector<String> optionList)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-    EINA_SAFETY_ON_NULL_RETURN(smartData->api);
-    EINA_SAFETY_ON_NULL_RETURN(smartData->api->data_list_show);
-
-    if (impl->dataList)
-        ewkViewDataListHideRequest(ewkView, inputType);
-
-    for (Vector<String>::const_iterator it = optionList.begin(); it != optionList.end(); ++it) {
-        String value = *it;
-        impl->dataList = eina_list_append(impl->dataList, eina_stringshare_add(value.utf8().data()));
-    }
-
-    smartData->api->data_list_show(smartData, inputType, impl->dataList);
-}
-
-void ewkViewDataListHideRequest(Evas_Object* ewkView, Ewk_Input_Type inputType)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-    EINA_SAFETY_ON_NULL_RETURN(impl->dataList);
-    EINA_SAFETY_ON_NULL_RETURN(smartData->api);
-    EINA_SAFETY_ON_NULL_RETURN(smartData->api->data_list_hide);
-
-    impl->deleteDataList();
-
-    smartData->api->data_list_hide(smartData, inputType);
-}
-#endif
-
-void ewk_view_data_list_close(Evas_Object* ewkView, const char* value)
-{
-#if ENABLE(TIZEN_DATALIST_ELEMENT)
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-
-    impl->deleteDataList();
-
-    ewk_view_focused_input_element_value_set(ewkView, value);
-#endif
-}
-
 Eina_Bool ewk_view_horizontal_panning_hold_get(Evas_Object* ewkView)
 {
 #if ENABLE(TIZEN_GESTURE)
@@ -4214,18 +4199,14 @@ void ewk_view_touch_event_handler_result_set(Evas_Object* ewkView, WebKit::WebEv
             evas_object_smart_callback_call(ewkView, "touchmove,handled", static_cast<void*>(&wasHandled));
         impl->wasHandledTouchMove = wasHandled;
     } else if (type == WebEvent::TouchEnd && !impl->exceedTouchMoveThreshold) {
-        if (!wasHandled) {
-            impl->gestureClient->setMovingEnabled(!wasHandled);
+        if (!wasHandled)
             impl->gestureClient->setTapEnabled(!wasHandled);
-        }
 #if ENABLE(TIZEN_ISF_PORT)
         else if (impl->pageProxy->isViewVisible()) {
             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();
-            }
+            if (hitTestResultData.isContentEditable && impl->inputMethodContext())
+                impl->inputMethodContext()->updateTextInputStateByUserAction(true);
         }
 #endif
     }
@@ -4369,7 +4350,7 @@ Eina_Bool ewk_view_feed_touch_event(Evas_Object* ewkView, Ewk_Touch_Event_Type t
 
 #if ENABLE(TIZEN_FOCUS_UI)
     if (type == EWK_TOUCH_START)
-        impl->page()->setSpatialNavigationEnabled(false);
+        impl->page()->setFocusUIEnabled(false);
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) && ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)