From: Jongseok Yang Date: Wed, 17 Apr 2013 13:49:42 +0000 (+0900) Subject: Implement the smart function for fullscreen API X-Git-Tag: 2.1_release~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=09e98d9c49faeaafdb54551fd871483b631ae689;p=framework%2Fweb%2Fwebkit-efl.git Implement the smart function for fullscreen API The UI operation for fullscreen API was already implemented. This patch is to use the interface which is implemented from opensource. [Title] Implement the smart function for fullscreen API [Issue#] N/A [Problem] N/A [Cause] N/A [Solution] N/A Change-Id: Ifb6d7b8215fcedfccf4fb7880e11399a02d4de71 --- diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index d600e7e..8729178 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -803,6 +803,7 @@ com) : Patch to do not adjust cover rect as fixed pixel size*/ #define ENABLE_TIZEN_MAIN_THREAD_SCHEDULE_DISCARD_DUPLICATE_REQUEST 1 /* Jihye Kang(jye.kang@samsung.com) : Fix lockup while doing stress test for filewriter */ +#define ENABLE_TIZEN_FULLSCREEN_API 1 /* Jongseok Yang(js45.yang@samsung.com) : Implement the smart function for fullscreen API */ #endif /* OS(TIZEN) */ /* ==== OS() - underlying operating system; only to be used for mandated low-level services like diff --git a/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp b/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp index 596f44b..2c605ce 100755 --- a/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp +++ b/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp @@ -469,11 +469,6 @@ void EwkViewImpl::informNewFormSubmissionRequest(Ewk_Form_Submission_Request* re */ void EwkViewImpl::enterFullScreen() { -#if OS(TIZEN) - ewk_view_main_frame_scrollbar_visible_set(m_view, false); - evas_object_smart_callback_call(m_view, "fullscreen,enterfullscreen", 0); - return; -#endif Ewk_View_Smart_Data* sd = smartData(); if (!sd->api->fullscreen_enter || !sd->api->fullscreen_enter(sd)) { @@ -488,11 +483,6 @@ void EwkViewImpl::enterFullScreen() */ void EwkViewImpl::exitFullScreen() { -#if OS(TIZEN) - ewk_view_main_frame_scrollbar_visible_set(m_view, true); - evas_object_smart_callback_call(m_view, "fullscreen,exitfullscreen", 0); - return; -#endif Ewk_View_Smart_Data* sd = smartData(); if (!sd->api->fullscreen_exit || !sd->api->fullscreen_exit(sd)) { diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp index f8a5c88..8a64478 100755 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp @@ -678,6 +678,27 @@ static void _ewk_view_on_hide(void* data, Evas*, Evas_Object*, void* /*eventInfo } #if OS(TIZEN) + +#if ENABLE(TIZEN_FULLSCREEN_API) +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); + return true; +} + +Eina_Bool _ewk_view_smart_fullscreen_exit(Ewk_View_Smart_Data* smartData) +{ + EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false); + + ewk_view_main_frame_scrollbar_visible_set(impl->view(), true); + evas_object_smart_callback_call(impl->view(), "fullscreen,exitfullscreen", 0); + return true; +} +#endif + #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION) Eina_Bool _ewk_view_text_selection_down(Ewk_View_Smart_Data* smartData, int x, int y) { @@ -1064,6 +1085,11 @@ Eina_Bool ewk_view_smart_class_set(Ewk_View_Smart_Class* api) api->gesture_end = _ewk_view_smart_gesture_end; api->gesture_move = _ewk_view_smart_gesture_move; +#if ENABLE(TIZEN_FULLSCREEN_API) + api->fullscreen_enter = _ewk_view_smart_fullscreen_enter; + api->fullscreen_exit = _ewk_view_smart_fullscreen_exit; +#endif + #if ENABLE(TIZEN_WEBKIT2_POPUP_INTERNAL) api->popup_menu_show = _ewk_view_popup_menu_show; #if ENABLE(TIZEN_MULTIPLE_SELECT)