[Tizen6.5 Migration]Skip logic of check firstrender in resume 18/260418/1 submit/tizen/20210625.160020
authorliwei <wei90727.li@samsung.com>
Thu, 24 Jun 2021 10:07:43 +0000 (18:07 +0800)
committerliwei <wei90727.li@samsung.com>
Thu, 24 Jun 2021 10:07:43 +0000 (18:07 +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.

Reference Patch:
https://review.tizen.org/gerrit/260240/

Change-Id: If8be2926596965e75fe2324a87f4a2ccd0de084f
Signed-off-by: liwei <wei90727.li@samsung.com>
wrt_app/src/web_application.ts

index 84be283..8a39aaa 100644 (file)
@@ -34,7 +34,6 @@ export class WebApplication {
 
   backgroundSupport: boolean = wrt.getBackgroundSupport();
   debugPort: number = 0;
-  firstRendered: boolean = false;
   contentSrc: string = '';
   loadFinished: boolean = false;
   pendingCallbacks: Map<number, any> = new Map();
@@ -184,7 +183,6 @@ export class WebApplication {
       if (this.showTimer)
         clearTimeout(this.showTimer);
       wrt.hideSplashScreen(0);
-      this.firstRendered = true;
       if (this.profileDelegate.isPreloading())
         return;
       this.show();
@@ -307,10 +305,6 @@ export class WebApplication {
     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();