зеркало из https://github.com/mozilla/gecko-dev.git
bug 799523 pt 1 - avoid mixing CSS-pix and device-pix coordinates in GetWindowInnerRectCenter. r=bz
This commit is contained in:
Родитель
310f7ce17b
Коммит
b3475263bb
|
@ -4174,6 +4174,12 @@ GetWindowInnerRectCenter(nsPIDOMWindow* aWindow,
|
|||
int32_t innerHeight = 0;
|
||||
aWindow->GetInnerHeight(&innerHeight);
|
||||
|
||||
// convert CSS pixels returned by GetInner{Width,Height} into device pixels
|
||||
// (so we can legitimately combine them with innerX and innerY from above,
|
||||
// and coords returned from aWidget->GetScreenBounds() below)
|
||||
innerWidth = int32_t(NS_round(aContext->CSSPixelsToDevPixels(innerWidth)));
|
||||
innerHeight = int32_t(NS_round(aContext->CSSPixelsToDevPixels(innerHeight)));
|
||||
|
||||
nsIntRect screen;
|
||||
aWidget->GetScreenBounds(screen);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче