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
old mode 100644 (file)
new mode 100755 (executable)
index c60fdcd..a357e8d
@@ -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)
@@ -159,6 +159,10 @@ namespace EGL {
 #include "WKDictionary.h"
 #include "ewk_web_application_icon_data_private.h"
 #endif
+
+#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
+#include "AutoFillPopup.h"
+#endif
 #endif // #if OS(TIZEN)
 
 using namespace WebKit;
@@ -242,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*);
@@ -276,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)
 {
@@ -307,7 +317,7 @@ static Eina_Bool _ewk_view_smart_focus_out(Ewk_View_Smart_Data* smartData)
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
-    if (impl->pageClient->isTextSelectionMode())
+    if (impl->pageClient->isTextSelectionMode() && ewk_settings_clear_text_selection_automatically_get(impl->settings()))
         impl->pageClient->setIsTextSelectionMode(false);
 #endif
 
@@ -375,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;
 }
 
@@ -392,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;
 }
@@ -408,19 +445,19 @@ static Eina_Bool _ewk_view_smart_gesture_start(Ewk_View_Smart_Data* smartData, c
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-    if (impl->focusRing) {
-        if (event->type == EWK_GESTURE_TAP && event->count == 1) {
-            impl->focusRing->requestToShow(IntPoint(event->position.x, event->position.y));
+    FocusRing* focusRing = impl->focusRing();
+    if (focusRing) {
+        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)
-                impl->focusRing->hide();
-        } else {
-            if (event->type != EWK_GESTURE_LONG_PRESS) {
+                focusRing->requestToHide();
+        } else if (event->type != EWK_GESTURE_LONG_PRESS) {
 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
-                if (!impl->pageClient->isContextMenuVisible())
+            if (!impl->pageClient->isContextMenuVisible())
 #endif
-                    impl->focusRing->hide();
-            }
+                focusRing->requestToHide();
         }
     }
 #endif
@@ -440,33 +477,38 @@ static Eina_Bool _ewk_view_smart_gesture_start(Ewk_View_Smart_Data* smartData, c
         if (ewk_settings_text_selection_enabled_get(impl->settings()))
             impl->pageClient->setIsTextSelectionMode(false);
 #endif
+
         IntPoint scenePoint(event->position.x, event->position.y);
         IntPoint contentsPoint = impl->transformFromScene().mapPoint(scenePoint);
-        WebHitTestResult::Data hitTestResultData = impl->pageProxy->hitTestResultAtPoint(contentsPoint);
+        WebHitTestResult::Data hitTestResultData = impl->pageProxy->hitTestResultAtPoint(contentsPoint, WebHitTestResult::HitTestModeDefault | WebHitTestResult::HitTestModeSetFocus);
         if (!hitTestResultData.absoluteMediaURL.isEmpty())
             break;
+
 #if ENABLE(TIZEN_DRAG_SUPPORT)
         // 1. Check to start dragging.
-        if (hitTestResultData.isDragSupport) {
+        if (hitTestResultData.isDragSupport && !hitTestResultData.isContentEditable) {
             impl->pageClient->setDragPoint(scenePoint);
+            if (impl->pageClient->isDragMode())
+                impl->pageClient->setDragMode(false);
+
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-            if (impl->focusRing)
-                impl->focusRing->show(IntRect(), true);
+            if (focusRing)
+                focusRing->showWithContextMenu(scenePoint, hitTestResultData.focusedColor, hitTestResultData.focusedRects);
 #endif
-            impl->gestureClient->showContextMenu(scenePoint);
             break;
         }
 #endif
+
         // 2. Check to show context menu.
-        if (!hitTestResultData.absoluteImageURL.isEmpty()
-            || !hitTestResultData.absoluteLinkURL.isEmpty()) {
+        if ((!hitTestResultData.absoluteImageURL.isEmpty() || !hitTestResultData.absoluteLinkURL.isEmpty())
+            && !hitTestResultData.isContentEditable) {
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-            if (impl->focusRing)
-                impl->focusRing->show(IntRect(), true);
+            if (focusRing)
+                focusRing->showWithContextMenu(scenePoint, hitTestResultData.focusedColor, hitTestResultData.focusedRects);
 #endif
-            impl->gestureClient->showContextMenu(scenePoint);
             break;
         }
+
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
         // 3. Check for text selection.
         if (ewk_settings_text_selection_enabled_get(impl->settings())) {
@@ -514,16 +556,19 @@ static Eina_Bool _ewk_view_smart_gesture_end(Ewk_View_Smart_Data* smartData, con
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) && ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
-    if (impl->pageClient->isTextSelectionMode() && impl->pageClient->isTextSelectionHandleDowned())
+    if (impl->pageClient->isTextSelectionMode() && impl->pageClient->isTextSelectionHandleDowned()) {
+        impl->pageClient->initTextSelectionHandlesMouseDownedStatus();
         return true;
+    }
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-    if (impl->focusRing) {
+    FocusRing* focusRing = impl->focusRing();
+    if (focusRing) {
 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
-        if (!impl->pageClient->isContextMenuVisible())
+        if (!impl->pageClient->isContextMenuVisible() || impl->pageClient->isTextSelectionMode())
 #endif
-            impl->focusRing->hide();
+            focusRing->requestToHide();
     }
 #endif
 
@@ -545,14 +590,15 @@ 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));
-        } else if (event->count == 2)
+        } else if (event->count == 2) {
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+            if (focusRing)
+                focusRing->requestToHide(true);
+#endif
             impl->gestureClient->endDoubleTap(IntPoint(event->position.x, event->position.y));
+        }
         break;
     case EWK_GESTURE_LONG_PRESS:
-#if ENABLE(TIZEN_DRAG_SUPPORT)
-        if (impl->pageClient->isDragMode())
-            impl->pageClient->setDragMode(false);
-#endif
         // Prcess endTap for LONG_PRESS gesture if text-selection and context menu did not work
         impl->gestureClient->endTap(IntPoint(event->position.x, event->position.y));
         break;
@@ -587,8 +633,13 @@ static Eina_Bool _ewk_view_smart_gesture_move(Ewk_View_Smart_Data* smartData, co
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-    if (impl->focusRing && !(event->type == EWK_GESTURE_PAN && !impl->exceedTouchMoveThreshold))
-        impl->focusRing->hide();
+    FocusRing* focusRing = impl->focusRing();
+    if (focusRing && !(event->type == EWK_GESTURE_PAN && !impl->exceedTouchMoveThreshold)) {
+#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
+        if (!impl->pageClient->isContextMenuVisible())
+#endif
+            focusRing->requestToHide(true);
+    }
 #endif
 
     switch (event->type) {
@@ -685,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;
 }
 
@@ -704,7 +756,7 @@ Eina_Bool _ewk_view_text_selection_down(Ewk_View_Smart_Data* smartData, int x, i
 {
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
-    return impl->pageClient->textSelectionDown(IntPoint(x, y), true);
+    return impl->pageClient->textSelectionDown(IntPoint(x, y));
 }
 
 Eina_Bool _ewk_view_text_selection_move(Ewk_View_Smart_Data* smartData, int x, int y)
@@ -712,7 +764,7 @@ Eina_Bool _ewk_view_text_selection_move(Ewk_View_Smart_Data* smartData, int x, i
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
     IntPoint point(x, y);
-    impl->pageClient->textSelectionMove(point, true);
+    impl->pageClient->textSelectionMove(point);
 
     return true;
 }
@@ -733,7 +785,7 @@ Eina_Bool _ewk_view_smart_formdata_candidate_show(Ewk_View_Smart_Data* smartData
 {
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
-    impl->pageClient->showFormDataCandidate(IntRect(x, y, w, h));
+    impl->pageClient->showAutoFillPopup(IntRect(x, y, w, h));
 
     return true;
 }
@@ -742,7 +794,7 @@ Eina_Bool _ewk_view_smart_formdata_candidate_hide(Ewk_View_Smart_Data* smartData
 {
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
-    impl->pageClient->hideFormDataCandidate();
+    impl->pageClient->hideAutoFillPopup();
 
     return true;
 }
@@ -751,13 +803,13 @@ Eina_Bool _ewk_view_smart_formdata_candidate_update_data(Ewk_View_Smart_Data* sm
 {
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
-    Vector<String> formData;
+    Vector<AutoFillPopupItem> formData;
     Eina_List* list;
     void* data;
     EINA_LIST_FOREACH(dataList, list, data)
-        formData.append(String::fromUTF8(static_cast<char*>(data)));
+        formData.append(AutoFillPopupItem(String::fromUTF8(static_cast<char*>(data)), candidateAutoFill));
 
-    impl->pageClient->updateFormDataCandidate(formData);
+    impl->pageClient->updateAutoFillPopup(formData);
 
     return true;
 }
@@ -766,7 +818,7 @@ Eina_Bool _ewk_view_smart_formdata_candidate_is_showing(Ewk_View_Smart_Data* sma
 {
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
-    return impl->pageClient->isShowingFormDataCandidate();
+    return impl->pageClient->isShowingAutoFillPopup();
 }
 #endif
 
@@ -775,7 +827,7 @@ Eina_Bool _ewk_view_screen_reader_action_execute(Ewk_View_Smart_Data* smartData,
 {
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
-    return ScreenReaderProxy::screenReader().executeAction(impl, static_cast<Elm_Access_Action_Info*>(actionInfo));
+    return ScreenReaderProxy::executeAction(impl, 0, static_cast<Elm_Access_Action_Info*>(actionInfo));
 }
 #endif
 #endif // #if OS(TIZEN)
@@ -862,8 +914,23 @@ static void _ewk_view_smart_del(Evas_Object* ewkView)
     EwkViewImpl::removeFromPageViewMap(ewkView);
     EWK_VIEW_SD_GET(ewkView, smartData);
 #if ENABLE(TIZEN_SCREEN_READER)
-    ScreenReaderProxy::screenReader().disable(smartData->priv);
+    ScreenReaderProxy::screenReader().finalize(smartData->priv);
 #endif
+#if ENABLE(TIZEN_INPUT_COLOR_PICKER)
+    // Close color picker if it's opened.
+    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);
 
@@ -884,6 +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);
 
+    Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
+    impl->pageClient->updateViewportSize(IntSize(width, height), ecore_evas_rotation_get(ee));
 #if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
     if (!ewk_view_is_opengl_backend(ewkView))
         _ewk_view_composite(smartData);
@@ -953,7 +1022,7 @@ 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);
-                impl->pageClient->updateViewportSize(IntSize(width, height), ecore_evas_rotation_get(ee));
+                impl->pageClient->updateVisibleContentRectSize(IntSize(width, height));
                 if (ewk_view_is_opengl_backend(ewkView))
                     impl->pageClient->displayViewport();
 #endif
@@ -966,6 +1035,10 @@ static void _ewk_view_smart_calculate(Evas_Object* ewkView)
     }
 
     if (smartData->changed.position) {
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+        IntSize diff(x - smartData->view.x, y - smartData->view.y);
+#endif
+
         evas_object_move(smartData->image, x, y);
         smartData->view.x = x;
         smartData->view.y = y;
@@ -974,11 +1047,15 @@ static void _ewk_view_smart_calculate(Evas_Object* ewkView)
 #if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
         impl->pageClient->frameRectChanged();
 #endif
-#if ENABLE(TIZEN_SCREEN_READER)
-        impl->pageProxy->recalcScreenReaderFocusRect();
-#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())
+            impl->focusRing()->moveBy(diff);
 #endif
 #endif // #if OS(TIZEN)
     }
@@ -996,6 +1073,10 @@ static void _ewk_view_smart_show(Evas_Object* ewkView)
     if (evas_object_clipees_get(smartData->base.clipper))
         evas_object_show(smartData->base.clipper);
     evas_object_show(smartData->image);
+
+#if ENABLE(TIZEN_SCREEN_READER)
+    ScreenReaderProxy::screenReader().initialize(impl);
+#endif
 }
 
 static void _ewk_view_smart_hide(Evas_Object* ewkView)
@@ -1102,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;
@@ -1172,11 +1249,6 @@ static void _ewk_view_initialize(Evas_Object* ewkView, PassRefPtr<Ewk_Context> c
     impl->pageProxy->pageGroup()->preferences()->setForceCompositingMode(true);
     impl->pageProxy->pageGroup()->preferences()->setFrameFlatteningEnabled(true);
     impl->pageProxy->pageGroup()->preferences()->setAllowUniversalAccessFromFileURLs(true);
-
-    int deviceWidth, deviceHeight;
-    ecore_evas_screen_geometry_get(ecore_evas_ecore_evas_get(evas_object_evas_get(ewkView)), 0, 0, &deviceWidth, &deviceHeight);
-    impl->pageProxy->pageGroup()->preferences()->setDeviceWidth(deviceWidth);
-    impl->pageProxy->pageGroup()->preferences()->setDeviceHeight(deviceHeight);
 #endif
 
     impl->pageProxy->initializeWebPage();
@@ -1213,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)
@@ -1262,10 +1335,6 @@ static void _ewk_view_initialize(Evas_Object* ewkView, PassRefPtr<Ewk_Context> c
     if (!impl->context->xWindow())
         impl->context->setXWindow(elm_win_xwindow_get(ewkView));
 #endif
-
-#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-    impl->focusRing = FocusRing::create(impl);
-#endif
 }
 
 static Evas_Object* _ewk_view_add_with_smart(Evas* canvas, Evas_Smart* smart)
@@ -1330,12 +1399,6 @@ Evas_Object* ewk_view_smart_add(Evas* canvas, Evas_Smart* smart, Ewk_Context* co
     if (!ewkView)
         return 0;
 
-#if ENABLE(TIZEN_ICON_DATABASE)
-    //set default iconDatabasePath
-    WKContextRef contextRef = context->wkContext();
-    toImpl(contextRef)->setIconDatabasePath(toImpl(contextRef)->iconDatabasePath());
-#endif
-
 #if ENABLE(TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
@@ -1399,6 +1462,7 @@ Eina_Bool ewk_view_reload(Evas_Object* ewkView)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
+    impl->pageClient->prepareRestoredVisibleContectRect();
     impl->pageProxy->reload(/*reloadFromOrigin*/ false);
     impl->informURLChange();
 
@@ -1599,49 +1663,105 @@ Ewk_Back_Forward_List* ewk_view_back_forward_list_get(const Evas_Object* ewkView
 }
 
 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
+#if ENABLE(TIZEN_WEBKIT2_AUTOFILL_PROFILE_FORM)
+void ewk_view_text_change_in_textfield(Evas_Object* ewkView, const String& name, const String& value, bool isInputInForm)
+#else
 void ewk_view_text_change_in_textfield(Evas_Object* ewkView, const String& name, const String& value)
+#endif // TIZEN_WEBKIT2_AUTOFILL_PROFILE_FORM
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
 
-    if (!ewk_settings_form_candidate_data_enabled_get(ewk_view_settings_get(ewkView)))
-        return;
-
     if (value.isEmpty()) {
         if(smartData->api->formdata_candidate_is_showing(smartData))
             smartData->api->formdata_candidate_hide(smartData);
         return;
     }
 
-    Vector<String> popupCandidates;
-    ewk_view_form_candidate_data_get(ewkView, name, popupCandidates);
-    std::sort(popupCandidates.begin(), popupCandidates.end(), WTF::codePointCompareLessThan);
+    Eina_List* optionList = 0;
+    Vector<String> popupOptionLists = impl->pageProxy->getFocusedInputElementDataList();
+    std::sort(popupOptionLists.begin(), popupOptionLists.end(), WTF::codePointCompareLessThan);
+    for (size_t i = 0; i < popupOptionLists.size(); ++i) {
+        if (popupOptionLists[i].startsWith(value, false))
+            optionList = eina_list_append(optionList, eina_stringshare_add(popupOptionLists[i].utf8().data()));
+    }
 
     Eina_List* candidateList = 0;
-    for (size_t i = 0; i < popupCandidates.size(); ++i) {
-        if (popupCandidates[i].startsWith(value, false))
-            candidateList = eina_list_append(candidateList, eina_stringshare_add(popupCandidates[i].utf8().data()));
+    if (ewk_settings_form_candidate_data_enabled_get(ewk_view_settings_get(ewkView))) {
+        Vector<String> popupCandidates;
+        ewk_view_form_candidate_data_get(ewkView, name, popupCandidates);
+        std::sort(popupCandidates.begin(), popupCandidates.end(), WTF::codePointCompareLessThan);
+
+        for (size_t i = 0; i < popupCandidates.size(); ++i) {
+            if (popupCandidates[i].startsWith(value, false))
+                candidateList = eina_list_append(candidateList, eina_stringshare_add(popupCandidates[i].utf8().data()));
+        }
+    }
+
+    Vector<AutoFillPopupItem> formData;
+
+#if ENABLE(TIZEN_WEBKIT2_AUTOFILL_PROFILE_FORM)
+    if (ewk_settings_form_profile_data_enabled_get(ewk_view_settings_get(ewkView)) && isInputInForm) {
+        Vector<std::pair<int, std::pair<String, String> > > profileFormCandidates;
+        ewk_view_profile_form_candidate_data_get(ewkView, name, value, profileFormCandidates);
+        for (size_t ittr = 0; ittr < profileFormCandidates.size(); ++ittr) {
+            std::pair<int, std::pair<String, String> > fullData(profileFormCandidates[ittr]);
+            std::pair<String, String> dispStrings(fullData.second);
+            formData.append(AutoFillPopupItem(dispStrings.first, dispStrings.second, fullData.first, profileAutoFill));
+        }
+    }
+#endif
+
+    Eina_List* list;
+    void* data;
+    if (eina_list_count(optionList)) {
+        EINA_LIST_FOREACH(optionList, list, data)
+            formData.append(AutoFillPopupItem(String::fromUTF8(static_cast<char*>(data)), dataListAutoFill));
+    }
+
+    if (eina_list_count(candidateList) && ewk_settings_form_candidate_data_enabled_get(ewk_view_settings_get(ewkView))) {
+        EINA_LIST_FOREACH(candidateList, list, data)
+            formData.append(AutoFillPopupItem(String::fromUTF8(static_cast<char*>(data)), candidateAutoFill));
     }
 
-    if (!eina_list_count(candidateList)) {
+    if (!formData.size()) {
         if(smartData->api->formdata_candidate_is_showing(smartData))
             smartData->api->formdata_candidate_hide(smartData);
         return;
     }
 
-    smartData->api->formdata_candidate_update_data(smartData, candidateList);
+    if (formData[0].itemtype == profileAutoFill)
+        impl->pageClient->updateAutoFillPopup(formData);
+    else {
+        Eina_List* autoFillList = 0;
 
-    IntRect inputFieldRect = impl->pageClient->focusedNodeRect();
+        if (eina_list_count(optionList)) {
+            EINA_LIST_FOREACH(optionList, list, data)
+                autoFillList = eina_list_append(autoFillList, eina_stringshare_add(static_cast<char*>(data)));
+        }
+        if (eina_list_count(candidateList)) {
+            EINA_LIST_FOREACH(candidateList, list, data)
+                autoFillList = eina_list_append(autoFillList, eina_stringshare_add(static_cast<char*>(data)));
+        }
+        smartData->api->formdata_candidate_update_data(smartData, autoFillList);
+    }
+
+    IntRect inputFieldRect = impl->transformToScene().mapRect(impl->pageClient->focusedNodeRect());
     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);
 }
 
@@ -1659,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);
 }
 
@@ -1867,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)
 {
@@ -1928,16 +2029,6 @@ Eina_Bool ewk_view_text_zoom_set(Evas_Object* ewkView, double textZoomFactor)
     return true;
 }
 
-#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-FocusRing* ewkViewGetFocusRing(Evas_Object* ewkView)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
-
-    return impl->focusRing.get();
-}
-#endif
-
 Ewk_Frame_Ref ewk_view_main_frame_get(Evas_Object* ewkView)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
@@ -1971,9 +2062,17 @@ void ewkViewLoadCommitted(Evas_Object* ewkView)
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
     impl->gestureClient->reset();
 #endif
+#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
+    if (impl->focusRing())
+        impl->focusRing()->hide(false);
+#endif
 #if ENABLE(TIZEN_ISF_PORT)
     impl->inputMethodContext()->hideIMFContext();
 #endif
+#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
+    if (smartData->api->formdata_candidate_is_showing(smartData))
+        smartData->api->formdata_candidate_hide(smartData);
+#endif
     impl->informURLChange();
     evas_object_smart_callback_call(ewkView, "load,committed", 0);
 }
@@ -2275,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)
@@ -2441,42 +2515,12 @@ 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);
 
-    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);
-
-    // scale contents' size with new scale factor
-#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
-    contentsSize.scale(newScaleFactor);
-#else
-    contentsSize.scale(newScaleFactor / scaleFactor);
-#endif
-
 #if ENABLE(TIZEN_ISF_PORT)
-    Ecore_X_Window rootWin = ecore_x_window_root_first_get();
-    ecore_x_event_mask_set(rootWin, ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
-    Ecore_X_Atom xAtom = ecore_x_atom_get("X External Keyboard Exist");
-    unsigned int connectedKeyboardNum = 0;
-    bool isExternalKeyboardConnected = false;
-
-    // get connected keyboard number
-    if (ecore_x_window_prop_card32_get(rootWin, xAtom, &connectedKeyboardNum, 1)
-        && connectedKeyboardNum)
-        isExternalKeyboardConnected = true;
-
     // We should treat both of ECORE_IMF_INPUT_PANEL_STATE_SHOW and ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW
     // as IME is shown. ECORE_IMF_INPUT_PANEL_STATE_HIDE is ignored at here.
     // input field zoom should not work with below conditions
@@ -2484,10 +2528,11 @@ bool ewk_view_focused_node_adjust(Evas_Object* ewkView, Eina_Bool adjustForExter
     // 2. external keyboard is not connected(if adjustForExternalKeyboard is true)
     // 3. imfContext is null(if adjustForExternalKeyboard is false)
     // 4. input panel state is hidden(if adjustForExternalKeyboard is false)
+
     if ((!(static_cast<PageClient*>(impl->pageClient.get()))->isViewFocused()
-        || (adjustForExternalKeyboard && !isExternalKeyboardConnected)
         || (!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
@@ -2495,41 +2540,42 @@ 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->getSelectionRect(true);
+    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)
-    selectionRect.scale(newScaleFactor);
-    focusedNodeRect.scale(newScaleFactor);
+    focusedNodeRectScaled.scale(newScaleFactor);
 #else
-    selectionRect.scale(newScaleFactor / scaleFactor);
-    focusedNodeRect.scale(newScaleFactor / scaleFactor);
+    focusedNodeRectScaled.scale(newScaleFactor / scaleFactor);
 #endif
-    if (selectionRect.isEmpty())
-        return false;
 
     IntRect visibleRect = impl->pageClient->visibleContentRect();
-    IntPoint scrollPosition = visibleRect.location();
-    // Do not adjust scroll position if selection rect (caret) is visible after scaling.
-    if (!visibleRect.contains(selectionRect)) {
-        // set paddings
-        scrollPosition = IntPoint(selectionRect.x() - visibleRect.width() / 3, selectionRect.y() - visibleRect.height() / 3);
-        // If both input field's position x and selection rect can be displayed together,
-        // adjust scroll position to input field's position x.
-        if (!focusedNodeRect.isEmpty() && selectionRect.x() - focusedNodeRect.x() < visibleRect.width() * 4 / 5)
-            scrollPosition.setX(focusedNodeRect.x());
-    }
+    if (visibleRect.contains(focusedNodeRectScaled))
+        return false;
 
-#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
-    impl->pageClient->setVisibleContentRect(IntRect(scrollPosition, impl->size()), newScaleFactor);
-#else
-    if (newScaleFactor != scaleFactor)
-        impl->pageProxy->scalePage(newScaleFactor, scrollPosition);
-    else
-        impl->pageProxy->scrollMainFrameTo(scrollPosition);
+#if ENABLE(TIZEN_WEBKIT2_INPUT_FIELD_ZOOM)
+    impl->inputFieldZoom->startInputFieldZoom(impl->transformFromScene().mapPoint(IntPoint(selectionRect.x(), selectionRect.y()))
+    , IntRect(focusedNodeRect.x(), selectionRect.y(), focusedNodeRect.width(), selectionRect.height()));
 #endif
-    evas_object_move(smartData->image, smartData->view.x, smartData->view.y);
+
     return true;
 }
 
@@ -2561,7 +2607,8 @@ static Eina_Bool _ewk_view_composite(void* data)
     evas_object_image_data_set(smartData->image, pixels);
     evas_object_image_data_update_add(smartData->image, 0, 0, ow, oh);
 
-    ewkViewFrameRendered(smartData->self);
+    if (impl->pageClient->notifiedNonemptyLayout() && impl->pageClient->canUpdateVisibleContentRect())
+        ewkViewFrameRendered(smartData->self);
 
     impl->compositionAnimator = 0;
 
@@ -2656,6 +2703,7 @@ void ewk_view_suspend(Evas_Object* ewkView)
     // Multiple suspend of ActiveDOMObject makes unintended suspend/resume status of
     // the ActiveDOMObject.
     if (!impl->suspendedResources && (!impl->isWaitingForJavaScriptPopupReply || !impl->isWaitingForApplicationCachePermission || !impl->isWaitingForExceededQuotaPopupReply)) {
+        impl->pageProxy->suspendAnimations();
         impl->pageProxy->suspendJavaScriptAndResource();
         impl->suspendedResources = true;
     }
@@ -2688,6 +2736,7 @@ void ewk_view_resume(Evas_Object* ewkView)
     // Multiple suspend of ActiveDOMObject makes unintended suspend/resume status of
     // the ActiveDOMObject.
     if (impl->suspendedResources && (!impl->isWaitingForJavaScriptPopupReply || !impl->isWaitingForApplicationCachePermission || !impl->isWaitingForExceededQuotaPopupReply)) {
+        impl->pageProxy->resumeAnimations();
         impl->pageProxy->resumeJavaScriptAndResource();
         impl->suspendedResources = false;
     }
@@ -2837,6 +2886,14 @@ const char* ewk_view_user_agent_get(const Evas_Object* ewkView)
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
 
+#if OS(TIZEN)
+    WKRetainPtr<WKStringRef> userAgentString(AdoptWK, WKPageCopyUserAgent(toAPI(impl->pageProxy.get())));
+
+    int length = WKStringGetMaximumUTF8CStringSize(userAgentString.get());
+    OwnArrayPtr<char> buffer = adoptArrayPtr(new char[length]);
+    WKStringGetUTF8CString(userAgentString.get(), buffer.get(), length);
+    impl->userAgent = buffer.get();
+#else
     if (!impl->userAgent) {
         WKRetainPtr<WKStringRef> userAgentString(AdoptWK, WKPageCopyUserAgent(toAPI(impl->pageProxy.get())));
 
@@ -2845,9 +2902,41 @@ const char* ewk_view_user_agent_get(const Evas_Object* ewkView)
         WKStringGetUTF8CString(userAgentString.get(), buffer.get(), length);
         impl->userAgent = buffer.get();
     }
+#endif
 
     return impl->userAgent;
 }
+
+#if OS(TIZEN)
+Eina_Bool ewk_view_application_name_for_user_agent_set(Evas_Object* ewkView, const char* applicationName)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(applicationName, false);
+
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+
+    WKRetainPtr<WKStringRef> applicationNameString(AdoptWK, WKStringCreateWithUTF8CString(applicationName));
+    WKPageSetApplicationNameForUserAgent(toAPI(impl->pageProxy.get()), applicationNameString.get());
+
+    return true;
+}
+
+const char* ewk_view_application_name_for_user_agent_get(const Evas_Object* ewkView)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0);
+    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, 0);
+
+    WKRetainPtr<WKStringRef> applicationNameString(AdoptWK, WKPageCopyApplicationNameForUserAgent(toAPI(impl->pageProxy.get())));
+
+    int length = WKStringGetMaximumUTF8CStringSize(applicationNameString.get());
+    OwnArrayPtr<char> buffer = adoptArrayPtr(new char[length]);
+    WKStringGetUTF8CString(applicationNameString.get(), buffer.get(), length);
+    impl->applicationName = buffer.get();
+
+    return impl->applicationName;
+}
+#endif
+
 Eina_Bool ewk_view_custom_header_add(const Evas_Object* ewkView, const char* name, const char* value)
 {
 #if ENABLE(TIZEN_CUSTOM_HEADERS)
@@ -2906,12 +2995,14 @@ Eina_Bool ewk_view_visibility_set(Evas_Object* ewkView, Eina_Bool enable)
         impl->pageClient->setDragMode(false);
 #endif
 
-#if ENABLE(TIZEN_SCREEN_READER)
-    if (enable)
-        ScreenReaderProxy::screenReader().enable(impl);
+    impl->pageClient->setIsVisible(enable);
+    return true;
+}
 #endif
 
-    impl->pageClient->setIsVisible(enable);
+#if ENABLE(TIZEN_BACKGROUND_DISK_CACHE)
+Eina_Bool ewk_view_foreground_set(Evas_Object* ewkView, Eina_Bool enable)
+{
     return true;
 }
 #endif
@@ -3041,6 +3132,16 @@ Eina_Bool ewk_view_scroll_size_get(const Evas_Object* ewkView, int* width, int*
     return true;
 }
 
+#if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
+void ewkViewNotifyPopupReplyWaitingState(Evas_Object* ewkView, bool isWaiting)
+{
+    if (isWaiting)
+        evas_object_smart_callback_call(ewkView, "popup,reply,wait,start", 0);
+    else
+        evas_object_smart_callback_call(ewkView, "popup,reply,wait,finish", 0);
+}
+#endif
+
 bool ewkViewRunJavaScriptAlert(Evas_Object* ewkView, WKStringRef alertText)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
@@ -3270,7 +3371,7 @@ void ewk_view_open_panel_reply(Evas_Object* ewkView, Eina_List* fileUrls, Eina_B
     unsigned int i = 0;
     KURL base(KURL(), "file://");
     EINA_LIST_FOREACH(fileUrls, list, data) {
-        KURL url(base, static_cast<char*>(data));
+        KURL url(base, String::fromUTF8(static_cast<char*>(data)));
         items[i++] = WKURLCreateWithUTF8CString(url.string().utf8().data());
     }
     WKRetainPtr<WKArrayRef> filesArray(AdoptWK, WKArrayCreate(items, size));
@@ -3868,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;
@@ -3919,12 +4021,19 @@ 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));
 }
 
-void 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);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
-    impl->pageProxy->selectionRangeClear();
+    bool isTextSelectionMode = impl->pageClient->isTextSelectionMode();
+    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)
 
@@ -3956,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)
@@ -3979,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)
@@ -4071,8 +4145,8 @@ void ewk_view_touch_event_handler_result_set(Evas_Object* ewkView, WebKit::WebEv
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
 
 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-    if (impl->focusRing && wasHandled)
-        impl->focusRing->hide();
+    if (impl->focusRing() && wasHandled)
+        impl->focusRing()->hide();
 #endif // #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
 
     if (impl->mouseEventsEnabled())
@@ -4125,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 {
+        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
     }
@@ -4144,14 +4214,13 @@ void ewk_view_touch_event_handler_result_set(Evas_Object* ewkView, WebKit::WebEv
 }
 
 #if ENABLE(TIZEN_WEBKIT2_GET_TEXT_STYLE_FOR_SELECTION)
-void  ewkViewDidGetTextStyleStateForSelection(Evas_Object* ewkView, int underlineState, int italicState, int boldState, const IntPoint& startPoint, const IntPoint& endPoint)
+void  ewkViewTextStyleState(Evas_Object* ewkView, const IntPoint& startPoint, const IntPoint& endPoint)
 {
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
 
     EditorState editorState = impl->page()->editorState();
-
-    Ewk_Text_Style* textStyle = ewkTextStyleCreate(underlineState, italicState, boldState, startPoint, endPoint, editorState.bgColor, editorState.color);
+    Ewk_Text_Style* textStyle = ewkTextStyleCreate(editorState, startPoint, endPoint);
     evas_object_smart_callback_call(ewkView, "text,style,state", static_cast<void*>(textStyle));
     ewkTextStyleDelete(textStyle);
 }
@@ -4279,6 +4348,11 @@ Eina_Bool ewk_view_feed_touch_event(Evas_Object* ewkView, Ewk_Touch_Event_Type t
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
     EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
 
+#if ENABLE(TIZEN_FOCUS_UI)
+    if (type == EWK_TOUCH_START)
+        impl->page()->setFocusUIEnabled(false);
+#endif
+
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) && ENABLE(TIZEN_WEBKIT2_FOR_MOVING_TEXT_SELECTION_HANDLE_FROM_OSP)
     if (impl->pageClient->isTextSelectionMode() && eina_list_count(points) == 1) {
         Ewk_Touch_Point* point = static_cast<Ewk_Touch_Point*>(eina_list_data_get(points));
@@ -4299,7 +4373,11 @@ Eina_Bool ewk_view_feed_touch_event(Evas_Object* ewkView, Ewk_Touch_Event_Type t
 #if ENABLE(TIZEN_GESTURE)
 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
     // We don't want to process touch event when context menu is shown.
-    if (impl->pageClient->isContextMenuVisible() && type != EWK_TOUCH_CANCEL)
+    if ((impl->pageClient->isContextMenuVisible() && type != EWK_TOUCH_CANCEL)
+#if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
+        && !impl->pageClient->isTextSelectionMode()
+#endif
+        )
         return true;
 #endif
 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
@@ -4479,17 +4557,6 @@ Eina_Bool ewk_view_animated_scroll_set(Evas_Object* ewkView, int x, int y)
 #endif
 }
 
-#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
-void ewkViewFocusRingHide(Evas_Object* ewkView)
-{
-    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
-    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
-
-    if (impl->focusRing)
-        impl->focusRing->hide();
-}
-#endif
-
 void ewk_view_content_security_policy_set(Evas_Object* ewkView, const char* policy, Ewk_CSP_Header_Type type)
 {
 #if ENABLE(TIZEN_CSP)
@@ -4780,3 +4847,39 @@ void ewk_view_use_settings_font(Evas_Object* ewkView)
     impl->pageProxy->useSettingsFont();
 #endif
 }
+
+void ewk_view_fullscreen_exit(Evas_Object* ewkView)
+{
+#if ENABLE(TIZEN_FULLSCREEN_API)
+    TIZEN_LOGI("");
+
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
+
+    if (!impl->pageProxy->fullScreenManager()->isFullScreen())
+        return;
+
+    impl->pageProxy->fullScreenManager()->requestExitFullScreen();
+#else
+    UNUSED_PARAM(ewkView);
+#endif
+}
+
+Eina_Bool ewk_view_draws_transparent_background_set(Evas_Object* ewkView, Eina_Bool enabled)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+
+    impl->pageProxy->setDrawsTransparentBackground(enabled);
+    evas_object_image_alpha_set(smartData->image, enabled);
+
+    return true;
+}
+
+Eina_Bool ewk_view_draws_transparent_background_get(Evas_Object* ewkView)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
+
+    return impl->pageProxy->drawsTransparentBackground();
+}