Bug 798607. Ensure GetContentsScaleFactor is 1.0 on all non-Mac platforms. r=smichaud,a=akeybl

This commit is contained in:
Robert O'Callahan 2012-10-08 23:36:06 +13:00
Родитель 3227b97749
Коммит 768fe580ee
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -3727,6 +3727,10 @@ nsPluginInstanceOwner::GetContentsScaleFactor(double *result)
{
NS_ENSURE_ARG_POINTER(result);
double scaleFactor = 1.0;
// On Mac, device pixels need to be translated to (and from) "display pixels"
// for plugins. On other platforms, plugin coordinates are always in device
// pixels.
#if defined(XP_MACOSX)
if (mWidget) {
scaleFactor = mWidget->GetDefaultScale();
} else {
@ -3746,6 +3750,7 @@ nsPluginInstanceOwner::GetContentsScaleFactor(double *result)
}
}
}
#endif
*result = scaleFactor;
return NS_OK;
}