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:
Jonathan Kew
2012-10-16 20:41:19 +01:00
parent 2cc6c5e41e
commit 80e3bb06d8
7 changed files with 63 additions and 2 deletions

View File

@@ -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)
{