From: Youngcheol Kang Date: Wed, 10 May 2017 08:10:21 +0000 (+0900) Subject: fixup! Implement Fullscreen API X-Git-Tag: submit/tizen_3.0/20170510.090145^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4336915fb56f6a90adf28e27e6a86bc47c38bf52;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git fixup! Implement Fullscreen API In tizen 2.4 environment, WRT calls the ewk_view_fullscreen_exit() API and exits the event handler when pressing hardware back key if it's fullscreen mode in only "Software key" mode or "windowed" view mode. However above two conditions(software key and windowed view modes) were omitted in tizen 3.0, so the ewk_view_fullscreen_exit() API was always called when pressing hardware back key in fullscreen mode. This CL fixes these problem. Bug: http://suprem.sec.samsung.net/jira/browse/TWF-3201 Change-Id: I4dda2d78be7af8cf75df72875aa2d7e94bbe2da9 Signed-off-by: Youngcheol Kang --- diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 5cb2b787d..240df69a8 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -978,6 +978,11 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { RemoveWebViewFromStack(view_stack_.front()); } } + + if (app_data_->widget_info()->view_modes() == "fullscreen") { + ewk_view_fullscreen_exit(view->evas_object()); + return; + } } } else if (enabled && kKeyNameMenu == keyname) { view->EvalJavascript(kMenuKeyEventScript); diff --git a/runtime/browser/web_view_impl.cc b/runtime/browser/web_view_impl.cc index 162bca963..797f98e48 100644 --- a/runtime/browser/web_view_impl.cc +++ b/runtime/browser/web_view_impl.cc @@ -980,10 +980,6 @@ void WebViewImpl::OnRotation(int degree) { void WebViewImpl::OnKeyEvent(Eext_Callback_Type key_type) { std::string keyname; if (key_type == EEXT_CALLBACK_BACK) { - if (fullscreen_) { - ewk_view_fullscreen_exit(ewk_view_); - return; - } if (EINA_TRUE == ewk_view_text_selection_clear(ewk_view_)) { return; }