0

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
This commit is contained in:
jamiewalch@chromium.org
2013-11-09 04:43:55 +00:00
parent 002b48e88e
commit 23af5fd989

@ -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 }}));
}
};