Skip logic of check firstrender in resume 40/260240/2 accepted/tizen_6.0_unified accepted/tizen/6.0/unified/20210625.170217 submit/tizen_6.0/20210625.003641
authorliwei <wei90727.li@samsung.com>
Tue, 22 Jun 2021 09:03:59 +0000 (17:03 +0800)
committerliwei <wei90727.li@samsung.com>
Wed, 23 Jun 2021 01:45:53 +0000 (09:45 +0800)
Resume() is invoked after window show, and window show is
called in "ready-to-show", in "ready-to-show" event,
firstrender has been set to true, so check firstrender
logic can be skipped in resume.

Change-Id: Ifde64c05dc8a89cdba4467fb214f531860926f83
Signed-off-by: liwei <wei90727.li@samsung.com>
wrt_app/src/web_application.ts [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 8015a3d..9695eeb
@@ -36,7 +36,6 @@ export class WebApplication {
 
   backgroundSupport = wrt.getBackgroundSupport();
   debugPort = 0;
-  firstRendered = false;
   inspectorSrc = '';
   loadFinished = false;
   pendingCallbacks: Map<number, any> = new Map();
@@ -251,7 +250,6 @@ export class WebApplication {
       if (this.showTimer)
         clearTimeout(this.showTimer);
       wrt.hideSplashScreen(0);
-      this.firstRendered = true;
       if (this.preloadStatus == 'preload') {
         this.preloadStatus = 'readyToShow';
         console.log('preloading show is skipped!');
@@ -280,9 +278,7 @@ export class WebApplication {
   }
 
   private initDisplayDelay(firstLaunch: boolean) {
-    // TODO: On 6.0, this causes a black screen on relaunch
-    if (firstLaunch)
-      this.firstRendered = false;
+    // TODO: On 6.0, this causes a black screen on relaunchss
     this.suspended = false;
     if (this.showTimer)
       clearTimeout(this.showTimer);
@@ -372,10 +368,6 @@ Then you can get profile log from the initial loading.`;
     this.suspended = false;
     addonManager.emit('lcResume', this.mainWindow.id);
 
-    if (!this.firstRendered) {
-      console.log('WebApplication : resume firstRendered is false');
-      return;
-    }
     if (!this.backgroundRunnable())
       this.windowList.forEach((window) => window.setEnabled(true));
     this.windowList[this.windowList.length - 1].show();