Bug 1792125 [Wayland] Always calculate relative popup coordinates for context menu r=emilio

Wne context menu is positioned by plain move, we need relative popup coordinates. So calculate them according to context menu parent popup.

Differential Revision: https://phabricator.services.mozilla.com/D158120
This commit is contained in:
stransky 2022-09-27 10:20:09 +00:00
Родитель 1746c7e32c
Коммит 666c946a5b
1 изменённых файлов: 1 добавлений и 4 удалений

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

@ -1481,10 +1481,7 @@ void nsWindow::WaylandPopupHierarchyCalculatePositions() {
}
}
#endif
if (popup->mPopupContextMenu && !popup->mPopupAnchored) {
LOG(" popup [%p] is first context menu", popup);
popup->mRelativePopupPosition = popup->mPopupPosition;
} else if (popup->WaylandPopupIsFirst()) {
if (popup->WaylandPopupIsFirst()) {
LOG(" popup [%p] has toplevel as parent", popup);
popup->mRelativePopupPosition = popup->mPopupPosition;
} else {