Title: [218548] releases/WebKitGTK/webkit-2.16/Source/WebKit2
Revision
218548
Author
[email protected]
Date
2017-06-20 00:04:13 -0700 (Tue, 20 Jun 2017)

Log Message

Merge r215225 - [GTK] Attach popup menu to web view widget
https://bugs.webkit.org/show_bug.cgi?id=145866

Use gtk_menu_attach_to_widget() to let GTK+ know that popup menus belong to a certain web view.
This improves the positioning choices that the toolkit can do, and solves a long-standing issue
that caused long popup menus to hang outside of the available display area under Wayland.

Based on a patch by Jonas Ådahl <[email protected]>.

Patch by Adrian Perez de Castro <[email protected]> on 2017-04-11
Reviewed by Carlos Garcia Campos.

* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::showPopupMenu):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog (218547 => 218548)


--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog	2017-06-20 07:04:07 UTC (rev 218547)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog	2017-06-20 07:04:13 UTC (rev 218548)
@@ -1,3 +1,19 @@
+2017-04-11  Adrian Perez de Castro  <[email protected]>
+
+        [GTK] Attach popup menu to web view widget
+        https://bugs.webkit.org/show_bug.cgi?id=145866
+
+        Use gtk_menu_attach_to_widget() to let GTK+ know that popup menus belong to a certain web view.
+        This improves the positioning choices that the toolkit can do, and solves a long-standing issue
+        that caused long popup menus to hang outside of the available display area under Wayland.
+
+        Based on a patch by Jonas Ådahl <[email protected]>.
+
+        Reviewed by Carlos Garcia Campos.
+
+        * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
+        (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
+
 2017-04-10  Adrian Perez de Castro  <[email protected]>
 
         [GTK] Misplaced right click menu on web page due to deprecated gtk_menu_popup()

Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp (218547 => 218548)


--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp	2017-06-20 07:04:07 UTC (rev 218547)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp	2017-06-20 07:04:13 UTC (rev 218548)
@@ -139,6 +139,8 @@
         menuPosition.setY(menuPosition.y() - rect.height() / 2);
     }
 
+    gtk_menu_attach_to_widget(GTK_MENU(m_popup), GTK_WIDGET(m_webView), nullptr);
+
     const GdkEvent* event = m_client->currentlyProcessedMouseDownEvent() ? m_client->currentlyProcessedMouseDownEvent()->nativeEvent() : nullptr;
 #if GTK_CHECK_VERSION(3, 22, 0)
     // Set the same properties that GTK+ uses itself for combo box popups.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to