mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 799523 pt 1 - avoid mixing CSS-pix and device-pix coordinates in GetWindowInnerRectCenter. r=bz
This commit is contained in:
parent
40e5355bbe
commit
89051567d8
@ -4173,7 +4173,13 @@ 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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user