From da1f49b012fda0756eef9634d10e73819d2eb88c Mon Sep 17 00:00:00 2001 From: Eunmi Lee Date: Thu, 21 Mar 2013 16:32:10 +0900 Subject: [PATCH] Remove ewk_view_top_of_contents_go() because it is not used anymore. [Title] Remove ewk_view_top_of_contents_go() because it is not used anymore. [Issue#] N/A [Problem] ewk_view_top_of_contents_go() is not used anymore. [Cause] The ewk_view_top_of_contents_go() was added for old UX concept, but it is not used anymore. And browser uses ewk_view_animated_scroll_set() API instead of that. [Solution] Remove ewk_view_top_of_contents_go(). Change-Id: Id9161c4bd81b8c09f5124194141391431cb378ae --- Source/WebKit2/UIProcess/API/efl/ewk_view.cpp | 12 --- Source/WebKit2/UIProcess/API/efl/ewk_view.h | 1 - TC/unit_test/webkit2/Makefile | 1 - TC/unit_test/webkit2/tslist | 1 - .../utc_webkit2_ewk_view_top_of_contents_go_func.c | 119 --------------------- 5 files changed, 134 deletions(-) delete mode 100644 TC/unit_test/webkit2/utc_webkit2_ewk_view_top_of_contents_go_func.c diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp index a77cf46..ab3f43a 100755 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp @@ -3388,18 +3388,6 @@ void ewkViewClearEdges(Evas_Object* ewkView) priv->isHorizontalEdge = false; } -void ewk_view_top_of_contents_go(Evas_Object* ewkView) -{ - EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData); - EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv); - -#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE) - priv->pageClient->setVisibleContentRect(IntRect(IntPoint(), ewk_view_size_get(ewkView)), priv->pageClient->scaleFactor()); -#else - priv->pageClient->page()->scrollMainFrameTo(IntPoint()); -#endif -} - void ewk_view_scale_range_get(Evas_Object* ewkView, double* minimumScale, double* maximumScale) { EWK_VIEW_SD_GET(ewkView, smartData); diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.h b/Source/WebKit2/UIProcess/API/efl/ewk_view.h index 793b7da..0d2de90 100644 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view.h +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.h @@ -624,7 +624,6 @@ 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 -EAPI void ewk_view_top_of_contents_go(Evas_Object* ewkView); /** * 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 a7abff1..46f5018 100644 --- a/TC/unit_test/webkit2/Makefile +++ b/TC/unit_test/webkit2/Makefile @@ -190,7 +190,6 @@ TARGETS = \ utc_webkit2_ewk_view_theme_get_func \ utc_webkit2_ewk_view_theme_set_func \ utc_webkit2_ewk_view_title_get_func \ - utc_webkit2_ewk_view_top_of_contents_go_func \ utc_webkit2_ewk_view_url_get_func \ utc_webkit2_ewk_view_url_set_func \ utc_webkit2_ewk_view_url_request_set_func \ diff --git a/TC/unit_test/webkit2/tslist b/TC/unit_test/webkit2/tslist index 79a2393..8759ed6 100644 --- a/TC/unit_test/webkit2/tslist +++ b/TC/unit_test/webkit2/tslist @@ -187,7 +187,6 @@ /unit_test/webkit2/utc_webkit2_ewk_view_theme_get_func /unit_test/webkit2/utc_webkit2_ewk_view_theme_set_func /unit_test/webkit2/utc_webkit2_ewk_view_title_get_func -/unit_test/webkit2/utc_webkit2_ewk_view_top_of_contents_go_func /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 diff --git a/TC/unit_test/webkit2/utc_webkit2_ewk_view_top_of_contents_go_func.c b/TC/unit_test/webkit2/utc_webkit2_ewk_view_top_of_contents_go_func.c deleted file mode 100644 index 0526da8..0000000 --- a/TC/unit_test/webkit2/utc_webkit2_ewk_view_top_of_contents_go_func.c +++ /dev/null @@ -1,119 +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_top_of_contents_go -#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 const int cScrollBy_1 = 10; - -static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished) -{ - utc_message("[loadFinished] :: \n"); -} - -/* Callback for load error */ -static void loadError(void* data, Evas_Object* webview, void* event_info) -{ - utc_message("[load_error] :: \n"); - utc_webkit2_main_loop_quit(); - - utc_fail(); -} - -static void frameRendered(void* data, Evas_Object* eObject, void* dataFinished) -{ - utc_message("[frameRendered] :: \n"); - utc_webkit2_main_loop_quit(); -} - -static void startup(void) -{ - utc_webkit2_ewk_test_init(); - evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL); - evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL); - evas_object_smart_callback_add(test_view.webview, "frame,rendered", frameRendered, NULL); -} - -static void cleanup(void) -{ - evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished); - evas_object_smart_callback_del(test_view.webview, "load,error", loadError); - evas_object_smart_callback_del(test_view.webview, "frame,rendered", frameRendered); - utc_webkit2_ewk_test_end(); -} - -static void loadURL(const char* url) -{ - char* full_path = generate_full_resource_path(url); - if (!full_path) - utc_fail(); - - Eina_Bool result = ewk_view_url_set(test_view.webview, full_path); - free(full_path); - - if (!result) - utc_fail(); -} - -/** - * @brief Positive test case of ewk_view_top_of_contents_go(), tseting scroll postion for testing API - */ -POS_TEST_FUN(1) -{ - loadURL(RESOURCE_PATH); - utc_webkit2_main_loop_begin(); - ewk_view_scroll_set(test_view.webview, 0, 0); - - int x,y; - Eina_Bool result = EINA_FALSE; - - ewk_view_scroll_set(test_view.webview, 0, 0); - - ewk_view_scroll_by(test_view.webview, cScrollBy_1, cScrollBy_1); - ewk_view_scroll_by(test_view.webview, cScrollBy_1, cScrollBy_1); - ewk_view_top_of_contents_go(test_view.webview); - ewk_view_scroll_pos_get(test_view.webview, &x, &y); - - if (x == 0 && y == 0) - result = EINA_TRUE; - - utc_check_eq(result, EINA_TRUE); -} - - -/** - * @brief Negative test case of ewk_view_top_of_contents_go(), testing for null, API should not crash when NULL is passed as a value - */ -NEG_TEST_FUN(1) -{ - ewk_view_top_of_contents_go(NULL); - utc_pass(); -} -- 2.7.4