From 323b62b0126d6c1789871feca717a6cba2f7ef6a Mon Sep 17 00:00:00 2001 From: Eunmi Lee Date: Thu, 21 Mar 2013 17:58:03 +0900 Subject: [PATCH] Remove ewk_view_use_smart_selection_set() API because it is not used anymore. [Title] Remove ewk_view_use_smart_selection_set() API because it is not used anymore. [Issue#] N/A [Problem] ewk_view_use_smart_selection_set() is not used anymore. [Cause] The ewk_view_use_smart_selection_set() was added for testing desktop web applications, but it is not used anymore and smart_selection is default behavior of ewk_view. If user want to disable zoom, he/she can set scalable variable to false in the viewport tag of web pages. [Solution] Remove ewk_view_use_smart_selection_set(). Change-Id: I16dc69f9da1a5a2591428517af99671854c99715 --- Source/WebKit2/UIProcess/API/efl/ewk_view.cpp | 13 +---- Source/WebKit2/UIProcess/API/efl/ewk_view.h | 3 - TC/unit_test/webkit2/Makefile | 1 - TC/unit_test/webkit2/tslist | 1 - ...webkit2_ewk_view_use_smart_selection_set_func.c | 65 ---------------------- 5 files changed, 1 insertion(+), 82 deletions(-) delete mode 100755 TC/unit_test/webkit2/utc_webkit2_ewk_view_use_smart_selection_set_func.c diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp index ab3f43a..90fd731 100755 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp @@ -306,7 +306,6 @@ struct _Ewk_View_Private_Data { #endif // #if ENABLE(TOUCH_EVENTS) bool holdHorizontalPanning; bool holdVerticalPanning; - bool useSmartSelection; #endif // #if ENABLE(TIZEN_GESTURE) #if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR) bool mainFrameScrollbarVisibility; @@ -808,7 +807,7 @@ static Eina_Bool _ewk_view_smart_gesture_end(Ewk_View_Smart_Data* smartData, con #if ENABLE(TIZEN_ISF_PORT) evas_object_focus_set(smartData->self, true); #endif - } else if (event->count == 2 && priv->useSmartSelection) + } else if (event->count == 2) priv->gestureClient->endDoubleTap(IntPoint(event->position.x, event->position.y)); break; case EWK_GESTURE_LONG_PRESS: @@ -1123,7 +1122,6 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData) #if ENABLE(TIZEN_GESTURE) priv->gestureRecognizer = GestureRecognizer::create(smartData->self); priv->gestureClient = GestureClient::create(smartData->ewkViewImpl); - priv->useSmartSelection = true; #endif // #if ENABLE(TIZEN_GESTURE) #if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR) const char* hideScrollbar = getenv("TIZEN_WEBKIT2_TILED_SCROLLBAR_HIDE"); @@ -5033,15 +5031,6 @@ void ewk_view_vertical_panning_hold_set(Evas_Object* ewkView, Eina_Bool hold) #endif } -void ewk_view_use_smart_selection_set(Evas_Object* ewkView, Eina_Bool use) -{ -#if ENABLE(TIZEN_GESTURE) - EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData) - EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv) - priv->useSmartSelection = use; -#endif -} - void ewk_view_touch_event_handler_result_set(Evas_Object* ewkView, WebKit::WebEvent::Type type, bool wasHandled) { #if ENABLE(TIZEN_GESTURE) diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.h b/Source/WebKit2/UIProcess/API/efl/ewk_view.h index 0d2de90..20056f7 100644 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view.h +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.h @@ -621,9 +621,6 @@ EAPI Eina_Bool ewk_view_horizontal_panning_hold_get(Evas_Object* o); EAPI void ewk_view_horizontal_panning_hold_set(Evas_Object* o, Eina_Bool hold); EAPI Eina_Bool ewk_view_vertical_panning_hold_get(Evas_Object* o); EAPI void ewk_view_vertical_panning_hold_set(Evas_Object* o, Eina_Bool hold); -// #if ENABLE(TIZEN_GESTURE) -EAPI void ewk_view_use_smart_selection_set(Evas_Object* ewkView, Eina_Bool use); -// #endif /** * Gets the minimum and maximum value of the scale range or -1 on failure diff --git a/TC/unit_test/webkit2/Makefile b/TC/unit_test/webkit2/Makefile index 46f5018..feda66d 100644 --- a/TC/unit_test/webkit2/Makefile +++ b/TC/unit_test/webkit2/Makefile @@ -193,7 +193,6 @@ TARGETS = \ utc_webkit2_ewk_view_url_get_func \ utc_webkit2_ewk_view_url_set_func \ utc_webkit2_ewk_view_url_request_set_func \ - utc_webkit2_ewk_view_use_smart_selection_set_func \ utc_webkit2_ewk_view_user_agent_get_func \ utc_webkit2_ewk_view_user_agent_set_func \ utc_webkit2_ewk_view_vertical_panning_hold_get_func \ diff --git a/TC/unit_test/webkit2/tslist b/TC/unit_test/webkit2/tslist index 8759ed6..105fe25 100644 --- a/TC/unit_test/webkit2/tslist +++ b/TC/unit_test/webkit2/tslist @@ -190,7 +190,6 @@ /unit_test/webkit2/utc_webkit2_ewk_view_url_get_func /unit_test/webkit2/utc_webkit2_ewk_view_url_set_func /unit_test/webkit2/utc_webkit2_ewk_view_url_request_set_func -/unit_test/webkit2/utc_webkit2_ewk_view_use_smart_selection_set_func /unit_test/webkit2/utc_webkit2_ewk_view_user_agent_get_func /unit_test/webkit2/utc_webkit2_ewk_view_user_agent_set_func /unit_test/webkit2/utc_webkit2_ewk_view_vertical_panning_hold_get_func diff --git a/TC/unit_test/webkit2/utc_webkit2_ewk_view_use_smart_selection_set_func.c b/TC/unit_test/webkit2/utc_webkit2_ewk_view_use_smart_selection_set_func.c deleted file mode 100755 index 2da2380..0000000 --- a/TC/unit_test/webkit2/utc_webkit2_ewk_view_use_smart_selection_set_func.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * WebKit2 EFL - * - * Copyright (c) 2012 Samsung Electronics Co., Ltd. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/* Define those macros _before_ you include the utc_webkit2_ewk.h header file. */ -#define TESTED_FUN_NAME ewk_view_use_smart_selection_set -#define POSITIVE_TEST_FUN_NUM 1 -#define NEGATIVE_TEST_FUN_NUM 1 - -#include "utc_webkit2_ewk.h" - -#ifndef NULL -#define NULL 0x0 -#endif - -#define RESOURCE_PATH "/ewk_view/index_big_red_square.html" - - - -static void startup(void) -{ - utc_webkit2_ewk_test_init(); -} - -static void cleanup(void) -{ - utc_webkit2_ewk_test_end(); -} - - -/** - * @brief Positive test case of ewk_view_use_smart_selection_set(), testcase will full-fill the basic test whether the API is not getting crash while set - */ -POS_TEST_FUN(1) -{ - ewk_view_use_smart_selection_set(test_view.webview,EINA_TRUE); - utc_check_eq(EINA_TRUE, EINA_TRUE); -} - - -/** - * @brief Negative test case of ewk_view_use_smart_selection_set(), testing for null, APi should not crash while passing NULL as argumnet - */ -NEG_TEST_FUN(1) -{ - ewk_view_use_smart_selection_set(NULL,EINA_TRUE); - utc_check_eq(EINA_TRUE, EINA_TRUE); -} -- 2.7.4