RESOLVED FIXED 146627
[GTK] Guard X11-specific code in webkitWebViewBaseDidRelaunchWebProcess()
https://bugs.webkit.org/show_bug.cgi?id=146627
Summary [GTK] Guard X11-specific code in webkitWebViewBaseDidRelaunchWebProcess()
Zan Dobersek
Reported 2015-07-06 01:34:29 PDT
Should be guarded with PLATFORM(X11).
Attachments
Patch (1.73 KB, patch)
2015-07-06 01:38 PDT, Zan Dobersek
cgarcia: review+
Zan Dobersek
Comment 1 2015-07-06 01:38:23 PDT
WebKit Commit Bot
Comment 2 2015-07-06 01:39:40 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Carlos Garcia Campos
Comment 3 2015-07-06 01:40:50 PDT
Comment on attachment 256201 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=256201&action=review > Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:1396 > +#if PLATFORM(X11) I think you can move this to the beginning of the function, the drawing area pointer is useless otherwise.
Zan Dobersek
Comment 4 2015-07-06 02:49:40 PDT
Michael Catanzaro
Comment 5 2015-07-06 05:49:21 PDT
Now that since we now support compiling with ENABLE_X11_TARGET and ENABLE_WAYLAND_TARGET at the same time, checks like these need to be done at both compile time *and* runtime. (So this patch is not wrong, but incomplete.) One way to do that would be: bool runningInX11 = GDK_IS_X11_DISPLAY(gdk_window_get_display(gtk_widget_get_window(GTK_WIDGET(webkitWebViewBase)))); Maybe we have a better way? Do we need to audit our code to check for places this was missed in the past? What about around uses of USE(REDIRECTED_XCOMPOSITE_WINDOW)?
Carlos Garcia Campos
Comment 6 2015-07-06 05:55:03 PDT
(In reply to comment #5) > Now that since we now support compiling with ENABLE_X11_TARGET and > ENABLE_WAYLAND_TARGET at the same time, checks like these need to be done at > both compile time *and* runtime. (So this patch is not wrong, but > incomplete.) > > One way to do that would be: > > bool runningInX11 = > GDK_IS_X11_DISPLAY(gdk_window_get_display(gtk_widget_get_window(GTK_WIDGET(we > bkitWebViewBase)))); > > Maybe we have a better way? Yes, PlatformDisplay::sharedDisplay().type() == PlatformDisplay::X11 > Do we need to audit our code to check for places this was missed in the > past? What about around uses of USE(REDIRECTED_XCOMPOSITE_WINDOW)?
Zan Dobersek
Comment 7 2015-07-07 22:45:34 PDT
(In reply to comment #6) > (In reply to comment #5) > > Now that since we now support compiling with ENABLE_X11_TARGET and > > ENABLE_WAYLAND_TARGET at the same time, checks like these need to be done at > > both compile time *and* runtime. (So this patch is not wrong, but > > incomplete.) > > > > One way to do that would be: > > > > bool runningInX11 = > > GDK_IS_X11_DISPLAY(gdk_window_get_display(gtk_widget_get_window(GTK_WIDGET(we > > bkitWebViewBase)))); > > > > Maybe we have a better way? > > Yes, PlatformDisplay::sharedDisplay().type() == PlatformDisplay::X11 > Bug #146711.
Note You need to log in before you can comment on or make changes to this bug.