Modified: releases/WebKitGTK/webkit-2.28/Source/WebKit/ChangeLog (260627 => 260628)
--- releases/WebKitGTK/webkit-2.28/Source/WebKit/ChangeLog 2020-04-24 09:20:31 UTC (rev 260627)
+++ releases/WebKitGTK/webkit-2.28/Source/WebKit/ChangeLog 2020-04-24 09:20:34 UTC (rev 260628)
@@ -1,5 +1,19 @@
2020-04-17 Carlos Garcia Campos <[email protected]>
+ [GTK][X11] REGRESSION(r259944): Wrong position of select popup menu in X11
+ https://bugs.webkit.org/show_bug.cgi?id=210603
+
+ Reviewed by Michael Catanzaro.
+
+ gdk_window_move_to_rect expects the given rectangle in coordinates relative to the top-left corner of the window
+ that the popup window is transient for. We were using screen coordinates.
+
+ * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
+ (WebKit::WebPopupMenuProxyGtk::showPopupMenu): Translate widget coordinates to window coordinates before passing
+ the rectangle to gdk_window_move_to_rect().
+
+2020-04-17 Carlos Garcia Campos <[email protected]>
+
[GTK] UI process crash when entering compositing mode when WPE_RENDERER is enabled
https://bugs.webkit.org/show_bug.cgi?id=209118
Modified: releases/WebKitGTK/webkit-2.28/Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp (260627 => 260628)
--- releases/WebKitGTK/webkit-2.28/Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp 2020-04-24 09:20:31 UTC (rev 260627)
+++ releases/WebKitGTK/webkit-2.28/Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp 2020-04-24 09:20:34 UTC (rev 260628)
@@ -276,9 +276,9 @@
gtk_widget_set_size_request(m_popup, width, -1);
gtk_scrolled_window_set_min_content_height(swindow, itemCount * itemHeight);
- IntPoint menuPosition = convertWidgetPointToScreenPoint(m_webView, rect.location());
#if GTK_CHECK_VERSION(3, 24, 0)
- GdkRectangle windowRect = { menuPosition.x(), menuPosition.y(), rect.width(), rect.height() };
+ GdkRectangle windowRect = { rect.x(), rect.y(), rect.width(), rect.height() };
+ gtk_widget_translate_coordinates(m_webView, toplevel, windowRect.x, windowRect.y, &windowRect.x, &windowRect.y);
gdk_window_move_to_rect(gtk_widget_get_window(m_popup), &windowRect, GDK_GRAVITY_SOUTH_WEST, GDK_GRAVITY_NORTH_WEST,
static_cast<GdkAnchorHints>(GDK_ANCHOR_FLIP | GDK_ANCHOR_SLIDE | GDK_ANCHOR_RESIZE), 0, 0);
#else
@@ -285,6 +285,7 @@
GtkRequisition menuRequisition;
gtk_widget_get_preferred_size(m_popup, &menuRequisition, nullptr);
+ IntPoint menuPosition = convertWidgetPointToScreenPoint(m_webView, rect.location());
if (menuPosition.x() + menuRequisition.width > area.x + area.width)
menuPosition.setX(area.x + area.width - menuRequisition.width);