Code in PlatformScreenGtk for screenDepth and screenRect can not assume that the platformWindow for the widget has a valid "window" member, and doing so causes segfaults (screenDepth) or GLib warnings (screenRect). For example, the case of, a new browser view opening as a child of a GtkNotebook, but never being switched to, or manually realized. Solve by using the toplevel window of the widget, rather than the widget itself.
Created attachment 25603 [details] Patch to fix described problem, + changelog entry.
Comment on attachment 25603 [details] Patch to fix described problem, + changelog entry. > - GdkVisual* visual = gdk_drawable_get_visual(GDK_DRAWABLE(GTK_WIDGET(widget->root()->hostWindow()->platformWindow())->window)); > + if (!GTK_WIDGET_REALIZED(container)) > + { > + GtkWidget * toplevel = gtk_widget_get_toplevel(container); > + if (GTK_WIDGET_TOPLEVEL(toplevel)) > + container = toplevel; > + else > + return 24; > + } please see the WebKit.org CodingStyle guideleines. the '{' is on the wrong line, your indention is messed up, also the indention of the ChangeLog is messed. Please fix this and attach an updated version of the patch.
Created attachment 25605 [details] Update to previous patch, fixing style mistakes.
Comment on attachment 25605 [details] Update to previous patch, fixing style mistakes. You can leave the Requestee field blank when requesting review.
Comment on attachment 25605 [details] Update to previous patch, fixing style mistakes. > + Code in PlatformScreenGtk for screenDepth and screenRect can not oh well, It can assume it. In fact the current code shows that it can assume it. It should not assume the widget to be realized. :) > + assume that the platformWindow for the widget has a valid "window" > + member. For example in the case of, a new browser view opening as a remove bogus space when landing...
This did land in r39203.