зеркало из https://github.com/mozilla/pjs.git
bug 622507 - snap popup menu's view position to device pixels. r+a=roc
This commit is contained in:
Родитель
7cfb555e80
Коммит
401d8f359c
|
@ -1281,6 +1281,11 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, PRBool aIsMove)
|
|||
// 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);
|
||||
|
||||
nsIView* view = GetView();
|
||||
NS_ASSERTION(view, "popup with no view");
|
||||
presContext->GetPresShell()->GetViewManager()->
|
||||
|
|
Загрузка…
Ссылка в новой задаче