Changeset 260252 in webkit
- Timestamp:
- Apr 17, 2020 8:24:56 AM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r260251 r260252 1 2020-04-17 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK][X11] REGRESSION(r259944): Wrong position of select popup menu in X11 4 https://bugs.webkit.org/show_bug.cgi?id=210603 5 6 Reviewed by Michael Catanzaro. 7 8 gdk_window_move_to_rect expects the given rectangle in coordinates relative to the top-left corner of the window 9 that the popup window is transient for. We were using screen coordinates. 10 11 * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: 12 (WebKit::WebPopupMenuProxyGtk::showPopupMenu): Translate widget coordinates to window coordinates before passing 13 the rectangle to gdk_window_move_to_rect(). 14 1 15 2020-04-17 David Kilzer <ddkilzer@apple.com> 2 16 -
trunk/Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp
r259944 r260252 277 277 gtk_scrolled_window_set_min_content_height(swindow, itemCount * itemHeight); 278 278 279 IntPoint menuPosition = convertWidgetPointToScreenPoint(m_webView, rect.location());280 279 #if GTK_CHECK_VERSION(3, 24, 0) 281 GdkRectangle windowRect = { menuPosition.x(), menuPosition.y(), rect.width(), rect.height() }; 280 GdkRectangle windowRect = { rect.x(), rect.y(), rect.width(), rect.height() }; 281 gtk_widget_translate_coordinates(m_webView, toplevel, windowRect.x, windowRect.y, &windowRect.x, &windowRect.y); 282 282 gdk_window_move_to_rect(gtk_widget_get_window(m_popup), &windowRect, GDK_GRAVITY_SOUTH_WEST, GDK_GRAVITY_NORTH_WEST, 283 283 static_cast<GdkAnchorHints>(GDK_ANCHOR_FLIP | GDK_ANCHOR_SLIDE | GDK_ANCHOR_RESIZE), 0, 0); … … 286 286 gtk_widget_get_preferred_size(m_popup, &menuRequisition, nullptr); 287 287 288 IntPoint menuPosition = convertWidgetPointToScreenPoint(m_webView, rect.location()); 288 289 if (menuPosition.x() + menuRequisition.width > area.x + area.width) 289 290 menuPosition.setX(area.x + area.width - menuRequisition.width);
Note: See TracChangeset
for help on using the changeset viewer.