Title: [275885] trunk/Tools
Revision
275885
Author
commit-qu...@webkit.org
Date
2021-04-13 08:30:48 -0700 (Tue, 13 Apr 2021)

Log Message

[GTK4] WTR crash in PlatformWebView::dismissAllPopupMenus()
https://bugs.webkit.org/show_bug.cgi?id=224487

Patch by Carlos Garcia Campos <cgar...@igalia.com> on 2021-04-13
Reviewed by Philippe Normand.

This is because we are using a for loop to iterate children that are destroyed. We should not be destroying the
children, though, we should just hide them, since they are owned by the web view.

* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::dismissAllPopupMenus):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (275884 => 275885)


--- trunk/Tools/ChangeLog	2021-04-13 14:20:44 UTC (rev 275884)
+++ trunk/Tools/ChangeLog	2021-04-13 15:30:48 UTC (rev 275885)
@@ -1,3 +1,16 @@
+2021-04-13  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK4] WTR crash in PlatformWebView::dismissAllPopupMenus()
+        https://bugs.webkit.org/show_bug.cgi?id=224487
+
+        Reviewed by Philippe Normand.
+
+        This is because we are using a for loop to iterate children that are destroyed. We should not be destroying the
+        children, though, we should just hide them, since they are owned by the web view.
+
+        * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+        (WTR::PlatformWebView::dismissAllPopupMenus):
+
 2021-04-13  Aakash Jain  <aakash_j...@apple.com>
 
         Delete various old EWS specific scripts

Modified: trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp (275884 => 275885)


--- trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp	2021-04-13 14:20:44 UTC (rev 275884)
+++ trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp	2021-04-13 15:30:48 UTC (rev 275885)
@@ -250,7 +250,7 @@
 #if USE(GTK4)
     for (auto* child = gtk_widget_get_first_child(GTK_WIDGET(m_view)); child; child = gtk_widget_get_next_sibling(child)) {
         if (GTK_IS_POPOVER(child))
-            gtk_widget_unparent(child);
+            gtk_widget_hide(child);
     }
 #else
     // gtk_menu_popdown doesn't modify the GList of attached menus, so it should
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to