Defer showing window when appcontrol-reset is being done 18/182918/2 accepted/tizen/4.0/unified/20180704.222058 submit/tizen_4.0/20180704.085055
authorsurya.kumar7 <surya.kumar7@samsung.com>
Thu, 28 Jun 2018 13:14:45 +0000 (18:44 +0530)
committersurya.kumar7 <surya.kumar7@samsung.com>
Thu, 28 Jun 2018 13:47:49 +0000 (19:17 +0530)
In Appcontrol-reload case, if window is shown before frame rendered,
expired content is visible for a considerable time. Avoid it by
showing the window only after frame has been rendered

Change-Id: I1f126e5480e4c992b68320320763d0f9883a74c5
Signed-off-by: surya.kumar7 <surya.kumar7@samsung.com>
runtime/browser/web_application.cc

index 2020951..8fa1049 100755 (executable)
@@ -644,12 +644,15 @@ void WebApplication::AppControl(
   if (do_reset) {
     // Reset to context
     ClearViewStack();
+    UnsetTimeout();
     WebView* view = view_stack_.front();
     SetupWebView(view);
     SetupWebViewCompatibilitySettings(view);
     view->SetDefaultEncoding(res->encoding());
     view->LoadUrl(res->uri(), res->mime());
     window_->SetContent(view->evas_object());
+    evas_object_hide(window_->evas_object());
+    SetTimeoutFirstFrameDelay();
   }
 
   if (!debug_mode_ && appcontrol->data(AUL_K_DEBUG) == "1") {
@@ -659,7 +662,8 @@ void WebApplication::AppControl(
   if (!verbose_mode_ && appcontrol->data(kVerboseKey) == "true") {
     verbose_mode_ = true;
   }
-  window_->Active();
+  if (!do_reset)
+    window_->Active();
 }
 
 void WebApplication::SendAppControlEvent() {
@@ -1224,9 +1228,7 @@ void WebApplication::OnRendered(WebView* view) {
   LOGGER(DEBUG) << "Rendered";
   splash_screen_->HideSplashScreen(SplashScreen::HideReason::RENDERED);
 
-  if (firstframe_delay_timer_) {
-    UnsetTimeout();
-  }
+  UnsetTimeout();
 
   // Set web view into Web voice touch agent
   if (NULL != vc_webview_) {