From: liwei Date: Tue, 22 Jun 2021 09:03:59 +0000 (+0800) Subject: Skip logic of check firstrender in resume X-Git-Tag: submit/tizen_6.0/20210625.003641^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f957360eee8c41dc5f8b033cdc1884102ba87d3;p=platform%2Fframework%2Fweb%2Fwrtjs.git Skip logic of check firstrender in resume 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 --- diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts old mode 100755 new mode 100644 index 8015a3df..9695eeb8 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -36,7 +36,6 @@ export class WebApplication { backgroundSupport = wrt.getBackgroundSupport(); debugPort = 0; - firstRendered = false; inspectorSrc = ''; loadFinished = false; pendingCallbacks: Map = 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();