This looks like an old copy/paste error.
Created attachment 334264 [details] Patch
Comment on attachment 334264 [details] Patch Wait, I think we have a leak here. All these gst_gl_display_*_new_with_egl_display are [transfer full] and we are not adopting them.
Comment on attachment 334264 [details] Patch Before the patch landed on https://bugzilla.gnome.org/show_bug.cgi?id=743062 these references were still floating, thus we can't adopt or we would get crashes in debug mode. After that patch, we need to adopt or we would be leaking. I think we can land as it is but we need a new bug to fix this.
Committed r228866: <https://trac.webkit.org/changeset/228866>
<rdar://problem/37738006>
This is wrong, the display we want to use for rendering is the EGL display created and initialized by the PlatformDisplay. This patch causes runtime errors like: 0:00:46.130136714 13362 0x5609ff9524a0 ERROR webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:956:handleMessage: Error 3: Failed to create a OpenGL context: EGL_BAD_CONTEXT (url=webkit+https://video.twimg.com/ext_tw_video/968118107192602624/pu/vid/640x360/dFLZDeagge7DOJd6.mp4) And then the web process hangs.
Reopening, not rolling out yet, just in case you have a quick fix. Otherwise, please roll it out.
Rolled out in r229022