mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 992229, convert device to css pixels before setting menupopup position after move or resize, r=tn
This commit is contained in:
parent
dcfe22cf0c
commit
83460d86bc
@ -271,6 +271,9 @@ nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
(oldRect.x != rect.x || oldRect.y != rect.y) &&
|
||||
(!menuPopupFrame->IsAnchored() ||
|
||||
menuPopupFrame->PopupLevel() != ePopupLevelParent)) {
|
||||
|
||||
rect.x = aPresContext->DevPixelsToIntCSSPixels(rect.x);
|
||||
rect.y = aPresContext->DevPixelsToIntCSSPixels(rect.y);
|
||||
menuPopupFrame->MoveTo(rect.x, rect.y, true);
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,10 @@ nsTitleBarFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
nsCOMPtr<nsIWidget> widget = menuPopupFrame->GetWidget();
|
||||
nsIntRect bounds;
|
||||
widget->GetScreenBounds(bounds);
|
||||
menuPopupFrame->MoveTo(bounds.x + nsMoveBy.x, bounds.y + nsMoveBy.y, false);
|
||||
|
||||
int32_t newx = aPresContext->DevPixelsToIntCSSPixels(bounds.x + nsMoveBy.x);
|
||||
int32_t newy = aPresContext->DevPixelsToIntCSSPixels(bounds.y + nsMoveBy.y);
|
||||
menuPopupFrame->MoveTo(newx, newy, false);
|
||||
}
|
||||
else {
|
||||
nsIPresShell* presShell = aPresContext->PresShell();
|
||||
|
Loading…
Reference in New Issue
Block a user