mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 961431. Round the final screen position of the popup to pixels, not the offset between it's view and parent view. r=enndeakin
This commit is contained in:
parent
d010bcac24
commit
1172e26981
@ -1334,14 +1334,15 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, bool aIsMove, bool aS
|
||||
"Popup is offscreen");
|
||||
}
|
||||
|
||||
// snap the popup's position in screen coordinates to device pixels,
|
||||
// see bug 622507, bug 961431
|
||||
screenPoint.x = presContext->RoundAppUnitsToNearestDevPixels(screenPoint.x);
|
||||
screenPoint.y = presContext->RoundAppUnitsToNearestDevPixels(screenPoint.y);
|
||||
|
||||
// determine the x and y position of the view by subtracting the desired
|
||||
// screen position from the screen position of the root frame.
|
||||
nsPoint viewPoint = screenPoint - rootScreenRect.TopLeft();
|
||||
|
||||
// snap the view's position to device pixels, see bug 622507
|
||||
viewPoint.x = presContext->RoundAppUnitsToNearestDevPixels(viewPoint.x);
|
||||
viewPoint.y = presContext->RoundAppUnitsToNearestDevPixels(viewPoint.y);
|
||||
|
||||
nsView* view = GetView();
|
||||
NS_ASSERTION(view, "popup with no view");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user