From 3d18ecebba8bc1d930a34ee39d64fea1faab94d5 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 1 Oct 2020 10:18:37 +0000 Subject: [PATCH] Bug 1640567 Pass expected window position to the NativeMoveResizeWaylandPopup to avoid repositioning; r=stransky If the position expected position of popup is not changed by the GTK (it popup fit into the screen) we don't have to update position of nsMenuPopupFrame in Gecko view. We sent the anchor position instead of expected popup position to the NativeMoveResizeWaylandPopup which triggered the view changes. Differential Revision: https://phabricator.services.mozilla.com/D92043 --- layout/xul/nsMenuPopupFrame.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp index a23514cd7a83..e036d8ad22a4 100644 --- a/layout/xul/nsMenuPopupFrame.cpp +++ b/layout/xul/nsMenuPopupFrame.cpp @@ -1422,11 +1422,9 @@ nsresult nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, !GDK_IS_X11_DISPLAY(gdk_display_get_default())) { screenPoint = nsPoint(anchorRect.x, anchorRect.y); mAnchorRect = anchorRect; - } else -#endif - { - screenPoint = AdjustPositionForAnchorAlign(anchorRect, hFlip, vFlip); } +#endif + screenPoint = AdjustPositionForAnchorAlign(anchorRect, hFlip, vFlip); } else { // with no anchor, the popup is positioned relative to the root frame anchorRect = rootScreenRect;