mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 563878. Part 16. Switch nsMenuPopupFrame::SetPopupPosition to using the new API to convert app units. r=mats
This commit is contained in:
parent
eaf04d25f4
commit
a33080b47d
@ -996,12 +996,10 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, PRBool aIsMove)
|
||||
|
||||
// the anchor may be in a different document with a different scale,
|
||||
// so adjust the size so that it is in the app units of the popup instead
|
||||
// of the anchor. This is done by converting to device pixels by dividing
|
||||
// by the anchor's app units per device pixel and then converting back to
|
||||
// app units by multiplying by the popup's app units per device pixel.
|
||||
float adj = float(presContext->AppUnitsPerDevPixel()) /
|
||||
aAnchorFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
parentRect.ScaleRoundOut(adj);
|
||||
// of the anchor.
|
||||
parentRect = parentRect.ConvertAppUnitsRoundOut(
|
||||
aAnchorFrame->PresContext()->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
|
||||
|
Loading…
Reference in New Issue
Block a user