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:
@ -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 }}));
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user