Title: [215225] trunk/Source/WebKit2
Revision
215225
Author
[email protected]
Date
2017-04-11 04:19:54 -0700 (Tue, 11 Apr 2017)

Log Message

[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: trunk/Source/WebKit2/ChangeLog (215224 => 215225)


--- trunk/Source/WebKit2/ChangeLog	2017-04-11 10:22:02 UTC (rev 215224)
+++ trunk/Source/WebKit2/ChangeLog	2017-04-11 11:19:54 UTC (rev 215225)
@@ -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  Alex Christensen  <[email protected]>
 
         Revert r215217

Modified: trunk/Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp (215224 => 215225)


--- trunk/Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp	2017-04-11 10:22:02 UTC (rev 215224)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp	2017-04-11 11:19:54 UTC (rev 215225)
@@ -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