From d779408cd99ce0f09a98bac963862767a793f40d Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Wed, 19 Jun 2019 17:22:52 +0900 Subject: [PATCH] Set default backgroundColor 1) Set background color as follows - TV: black - Others : white 2) transparent is not truely working, becuase there is no proper implementation of native side. If needs, NativeWindowEfl class will support this Related patch for this: https://review.tizen.org/gerrit/208174/ Change-Id: Id028bb05d98be8be221784ab20892da8ba71ec88 Signed-off-by: DongHyun Song --- wrt_app/src/web_application.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) mode change 100644 => 100755 wrt_app/src/web_application.js diff --git a/wrt_app/src/web_application.js b/wrt_app/src/web_application.js old mode 100644 new mode 100755 index 69f45a8..b6729c4 --- a/wrt_app/src/web_application.js +++ b/wrt_app/src/web_application.js @@ -45,6 +45,9 @@ class WebApplication { this.suspended = true; this.loadFinished = false; this.runningStatus = 'none'; + this.isTVProfile = (wrt.getPlatformType() === "product_tv"); + this.defaultBackgroundColor = (this.isTVProfile ? '#000' : '#FFF'); + this.defaultTransparent = (this.isTVProfile ? true : false); let self = this; app.on('browser-window-created', function(event, window) { @@ -170,6 +173,8 @@ class WebApplication { getBrowserWindowOption(options) { return { fullscreen: false, + backgroundColor: this.defaultBackgroundColor, + transparent: this.defaultTransparent, show: false, webPreferences: { nodeIntegration: options.isAddonAvailable, @@ -191,7 +196,7 @@ class WebApplication { }); } let self = this; - if (!(wrt.getPlatformType() === "product_tv")) { + if (!self.isTVProfile) { self.showTimer = setTimeout(() => { if (!self.suspended) { console.log('FrameRendered not obtained from engine. To show window, timer fired'); @@ -228,7 +233,7 @@ class WebApplication { if (self.runningStatus !== 'behind') wrt.notifyAppStatus('preload'); } - if((self.debugport) && (wrt.getPlatformType() === "product_tv")) { + if(self.debugport && self.isTVProfile) { const kDebugPopupScript = "alert('port number :" + self.debugport +"')"; wrt.executeJS(self.mainWindow.webContents, kDebugPopupScript); self.debugport = 0; -- 2.7.4