From: surya.kumar7 Date: Thu, 28 Jun 2018 13:14:45 +0000 (+0530) Subject: Defer showing window when appcontrol-reset is being done X-Git-Tag: submit/tizen_4.0/20180704.085055^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0266d0ee0f1be9f0184c7ada996e48880719a313;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Defer showing window when appcontrol-reset is being done 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 --- diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 202095179..8fa104988 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -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_) {