fixup! Implement Fullscreen API 10/128510/1 accepted/tizen/3.0/common/20170511.174303 accepted/tizen/3.0/ivi/20170510.222302 accepted/tizen/3.0/mobile/20170510.222254 accepted/tizen/3.0/tv/20170510.222257 accepted/tizen/3.0/wearable/20170510.222259 submit/tizen_3.0/20170510.090145 submit/tizen_3.0_common/20170511.082856
authorYoungcheol Kang <ychul.kang@samsung.com>
Wed, 10 May 2017 08:10:21 +0000 (17:10 +0900)
committerYoungcheol Kang <ychul.kang@samsung.com>
Wed, 10 May 2017 08:10:32 +0000 (17:10 +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 5cb2b787d1dcfd1e1e49ebc0551d2bb29049567d..240df69a8c6c1c44b8eec476f47a2485f7027fcb 100755 (executable)
@@ -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);
index 162bca963ed559cd64a0c5e3361cfc2c905f7a30..797f98e48c3b552c07fcc01d1e0ed08c1a741157 100644 (file)
@@ -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;
     }