diff options
author | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 22:19:11 +0000 |
---|---|---|
committer | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 22:19:11 +0000 |
commit | 315e47b2c1cfb9672dfc79b61125ddaeb126d545 (patch) | |
tree | 4f42f59d076530f88d643af3072b48f1b0bc64d6 /remoting/webapp | |
parent | 9e9d27832736dd2edf7a7053851bf4a49a8e1b36 (diff) | |
download | chromium_src-315e47b2c1cfb9672dfc79b61125ddaeb126d545.zip chromium_src-315e47b2c1cfb9672dfc79b61125ddaeb126d545.tar.gz chromium_src-315e47b2c1cfb9672dfc79b61125ddaeb126d545.tar.bz2 |
Disable scroll-bars in shrink-to-fit mode.
This works around a bug in Chrome whereby scroll-bars are added unnecessarily.
BUG=252796,240772
Review URL: https://chromiumcodereview.appspot.com/17288017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207935 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp')
-rw-r--r-- | remoting/webapp/client_session.js | 8 | ||||
-rw-r--r-- | remoting/webapp/main.css | 6 | ||||
-rw-r--r-- | remoting/webapp/ui_mode.js | 3 |
3 files changed, 17 insertions, 0 deletions
diff --git a/remoting/webapp/client_session.js b/remoting/webapp/client_session.js index f8f76ba..952fd61 100644 --- a/remoting/webapp/client_session.js +++ b/remoting/webapp/client_session.js @@ -652,6 +652,14 @@ remoting.ClientSession.prototype.setScreenMode_ = if (needsScrollReset) { this.scroll_(0, 0); } + + // TODO(jamiewalch): crbug.com/252796: Remove this once crbug.com/240772 + // is fixed. + if (this.shrinkToFit_) { + document.body.parentNode.classList.add('no-scroll'); + } else { + document.body.parentNode.classList.remove('no-scroll'); + } } /** diff --git a/remoting/webapp/main.css b/remoting/webapp/main.css index 6411f1c..eac75f4 100644 --- a/remoting/webapp/main.css +++ b/remoting/webapp/main.css @@ -599,6 +599,12 @@ button { opacity: 0.75; } +/* TODO(jamiewalch): crbug.com/252796: Remove this once crbug.com/240772 + * is fixed. */ +.no-scroll { + overflow: hidden; +} + /* TODO(jamiewalch): Reinstate this if we're able to get translations for * "Why is this safe?" that don't overflow in any language. #host-setup-dialog { diff --git a/remoting/webapp/ui_mode.js b/remoting/webapp/ui_mode.js index 0a425fc..1fb832f 100644 --- a/remoting/webapp/ui_mode.js +++ b/remoting/webapp/ui_mode.js @@ -128,6 +128,9 @@ remoting.setMode = function(mode) { false); document.removeEventListener('webkitvisibilitychange', remoting.onVisibilityChanged, false); + // TODO(jamiewalch): crbug.com/252796: Remove this once crbug.com/240772 + // is fixed. + document.body.parentNode.classList.remove('no-scroll'); } }; |