From: Seonae Kim Date: Thu, 20 Jun 2013 10:34:52 +0000 (+0900) Subject: Add ewk_view_fullscreen_exit to exit fullscreen mode X-Git-Tag: submit/tizen_2.2/20130714.131554~11 X-Git-Url: http://review.tizen.org/git/?p=framework%2Fweb%2Fwebkit-efl.git;a=commitdiff_plain;h=1b24f82670be931c90d92ee1eb5297da96971801 Add ewk_view_fullscreen_exit to exit fullscreen mode [Title] Add ewk_view_fullscreen_exit to exit fullscreen mode [Issue] N/A [Problem] when the back key is pressed, move to the previous page, despite being in fullscreen. [Cause] The H/W back key is applied. [Solution] In apps, should call this api instead of history back. Change-Id: I2df4f6d4e82e05505157885bdd21a0c173c07ad2 --- diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp index 1404830..af456ca 100755 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp @@ -4827,3 +4827,20 @@ 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 +} diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.h b/Source/WebKit2/UIProcess/API/efl/ewk_view.h index 66e1c38..01d95b2a 100644 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view.h +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.h @@ -1717,6 +1717,14 @@ EAPI void ewk_view_rotation_prepare(Evas_Object* ewkView, int angle); */ EAPI void ewk_view_use_settings_font(Evas_Object* o); +/* + * Exit fullscreen when the back key is pressed. + * + * @param o view object to exit fullscreen mode + * + */ +EAPI void ewk_view_fullscreen_exit(Evas_Object* o); + #ifdef __cplusplus } #endif