fixup! Implement Fullscreen API accepted/tizen/unified/20170510.183533 submit/tizen/20170510.090339
authorYoungcheol Kang <ychul.kang@samsung.com>
Wed, 10 May 2017 08:10:21 +0000 (17:10 +0900)
committerjaekuk, lee <juku1999@samsung.com>
Wed, 10 May 2017 09:03:17 +0000 (18:03 +0900)
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 <ychul.kang@samsung.com>
runtime/browser/web_application.cc
runtime/browser/web_view_impl.cc

index 94ed40a4999f3b96681b1a11f770457710a56e8c..1d0a6c40316c5d8dc403ccf60d2d65d2452d4352 100755 (executable)
@@ -1003,6 +1003,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);
index 34d8e570c657dbea10d9c5d96e580a46ce959c20..ea77e153b6c909a8deab44331904271dd2f0418e 100644 (file)
@@ -985,10 +985,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;
     }