Bug title: [GTK] Use gdk_window_move_to_rect() to position popup menus WebPopupMenuProxyGtk::showPopupMenu currently uses gtk_window_move() to position the popup menu. Jonas doesn't like this; he says it can cause the menu to be positioned offscreen. Indeed, we have a longstanding bug where context menus near the bottom of the window will exceed the length of the screen. Jonas says Firefox doesn't have this problem, and that the fix would be to use gdk_window_move_to_rect() instead. Our code already has a FIXME to do this, with a pointer to a bug report asking for that API (which was private at the time) to be exported: // FIXME: We can't ensure the menu will be on screen in Wayland. // https://blog.gtk.org/2016/07/15/future-of-relative-window-positioning/ // https://gitlab.gnome.org/GNOME/gtk/issues/997 I looked into trying this, but it didn't look simple.
Created attachment 396162 [details] Patch
Committed r259944: <https://trac.webkit.org/changeset/259944>
Created attachment 396632 [details] Regression: dropdown select menus mispositioned With this patch, I am finding that dropdown SELECT menus are mispositioned. See attachment. GTK 3.24.11 / X11 (If I should be opening new slips for regressions, please let me know.)