diff options
author | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-09 04:43:55 +0000 |
---|---|---|
committer | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-09 04:43:55 +0000 |
commit | 23af5fd989e0ca286c05759ceee663d25a0940ac (patch) | |
tree | e2311746e8c7146a3fdde7455dcb8eb3e3601612 /remoting | |
parent | 002b48e88e3f92d9faa13f596e6abbfa67b9524b (diff) | |
download | chromium_src-23af5fd989e0ca286c05759ceee663d25a0940ac.zip chromium_src-23af5fd989e0ca286c05759ceee663d25a0940ac.tar.gz chromium_src-23af5fd989e0ca286c05759ceee663d25a0940ac.tar.bz2 |
Ensure that dimensions and DPI are integers.
They are extracted by the client plugin as ints, and the message is not
forwarded to the host if they are not.
TEST=Change the browser zoom level to something other than 100% and ensure that resize-to-client still works.
Review URL: https://codereview.chromium.org/66673007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/webapp/client_plugin_async.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/remoting/webapp/client_plugin_async.js b/remoting/webapp/client_plugin_async.js index 7aa255a..3e0461f 100644 --- a/remoting/webapp/client_plugin_async.js +++ b/remoting/webapp/client_plugin_async.js @@ -524,11 +524,11 @@ remoting.ClientPluginAsync.prototype.sendClipboardItem = remoting.ClientPluginAsync.prototype.notifyClientResolution = function(width, height, device_scale) { if (this.hasFeature(remoting.ClientPlugin.Feature.NOTIFY_CLIENT_RESOLUTION)) { - var dpi = device_scale * 96; + var dpi = Math.floor(device_scale * 96); this.plugin.postMessage(JSON.stringify( { method: 'notifyClientResolution', - data: { width: width * device_scale, - height: height * device_scale, + data: { width: Math.floor(width * device_scale), + height: Math.floor(height * device_scale), x_dpi: dpi, y_dpi: dpi }})); } }; |