зеркало из https://github.com/mozilla/gecko-dev.git
Bug 798607. Ensure GetContentsScaleFactor is 1.0 on all non-Mac platforms. r=smichaud,a=akeybl
This commit is contained in:
Родитель
3227b97749
Коммит
768fe580ee
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче