bug 794038 pt 0.9 - provide an unscaledDevicePixelsPerCSSPixel attribute on nsIBaseWindow to expose the default device-pix/css-pix ratio. r=roc
This commit is contained in:
@@ -4933,6 +4933,23 @@ nsDocShell::Destroy()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetUnscaledDevicePixelsPerCSSPixel(double *aScale)
|
||||
{
|
||||
if (mParentWidget) {
|
||||
*aScale = mParentWidget->GetDefaultScale();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIBaseWindow> ownerWindow(do_QueryInterface(mTreeOwner));
|
||||
if (ownerWindow) {
|
||||
return ownerWindow->GetUnscaledDevicePixelsPerCSSPixel(aScale);
|
||||
}
|
||||
|
||||
*aScale = 1.0;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetPosition(int32_t x, int32_t y)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user