Bug 1143974. When converting the anchor rect for a xul popup make sure to actually convert for app units differences. r=mats

ConvertAppUnitsRoundOut returns the result, it doesn't modify |this|.
This commit is contained in:
Timothy Nikkel 2015-03-18 03:55:01 -05:00
parent 54558bd97b
commit 7836769148

View File

@ -1221,8 +1221,9 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, bool aIsMove, bool aS
// Relative to the screen
parentRect.MoveBy(referenceFrame->GetScreenRectInAppUnits().TopLeft());
// In its own app units
parentRect.ConvertAppUnitsRoundOut(rootPresContext->AppUnitsPerDevPixel(),
presContext->AppUnitsPerDevPixel());
parentRect =
parentRect.ConvertAppUnitsRoundOut(rootPresContext->AppUnitsPerDevPixel(),
presContext->AppUnitsPerDevPixel());
// Set the popup's size to the preferred size. Below, this size will be
// adjusted to fit on the screen or within the content area. If the anchor