Index: remoting/webapp/client_plugin_async.js |
diff --git a/remoting/webapp/client_plugin_async.js b/remoting/webapp/client_plugin_async.js |
index 7aa255aa464959f74b6c92ba5a144ee76cb7fd95..3e0461fd41b70eef35f45951dff8411def826155 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), |
Lambros
2013/11/08 22:26:33
Math.round might be slightly better?
Jamie
2013/11/08 22:29:15
I think we want floor. A 1px border is better than
|
x_dpi: dpi, y_dpi: dpi }})); |
} |
}; |