Chromium Code Reviews| Index: chrome/browser/resources/vr_shell/vr_shell_ui.js |
| diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui.js b/chrome/browser/resources/vr_shell/vr_shell_ui.js |
| index 68e9d935e90b6d19f4362d2e5fb4ecc6de2c6568..1e5d1f243ea29cea1ab6ed558af4dccfd52c6643 100644 |
| --- a/chrome/browser/resources/vr_shell/vr_shell_ui.js |
| +++ b/chrome/browser/resources/vr_shell/vr_shell_ui.js |
| @@ -10,7 +10,6 @@ var vrShellUi = (function() { |
| let uiRootElement = document.querySelector('#ui'); |
| let uiStyle = window.getComputedStyle(uiRootElement); |
| - let scaleFactor = uiStyle.getPropertyValue('--scaleFactor'); |
| /** @const */ var ANIM_DURATION = 150; |
| function getStyleFloat(style, property) { |
| @@ -70,8 +69,7 @@ var vrShellUi = (function() { |
| let pixelHeight = Math.ceil(rect.bottom) - pixelY; |
| let element = new api.UiElement(pixelX, pixelY, pixelWidth, pixelHeight); |
| - element.setSize(scaleFactor * pixelWidth / 1000, |
| - scaleFactor * pixelHeight / 1000); |
| + element.setSize(pixelWidth / 1000, pixelHeight / 1000); |
| // Pull additional custom properties from CSS. |
| let style = window.getComputedStyle(domElement); |
| @@ -414,6 +412,9 @@ var vrShellUi = (function() { |
| this.controls.setEnabled(mode == api.Mode.STANDARD && !menuMode); |
| this.omnibox.setEnabled(mode == api.Mode.STANDARD && !menuMode); |
| this.secureOriginWarnings.setEnabled(mode == api.Mode.WEB_VR); |
| + |
| + let uiElement = document.querySelector('#ui'); |
|
bshe
2016/11/30 23:00:46
nit: use uiRootElement directly?
mthiesse
2016/11/30 23:25:05
Done.
|
| + api.setUiCssSize(uiElement.clientWidth, uiElement.clientHeight, 1.0); |
| } |
| setSecureOrigin(secure) { |