bug 622507 - snap popup menu's view position to device pixels. r+a=roc

This commit is contained in:
Jonathan Kew 2011-02-21 08:52:42 +00:00
Родитель 7cfb555e80
Коммит 401d8f359c
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

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