Using strstr() is not sufficient to safely check for (E)GL extensions, because it may match a substring of the extension name you're testing for. For example, if you're testing for the GL_EXT_texture extension and glGetString(GL_EXTENSIONS) returns "GL_EXT_texture3D" then simply using strstr() will incorrectly tell you that GL_EXT_texture is supported. (From http://www.mesa3d.org/brianp/sig97/exten.htm ) We currently use strstr() with no extra checks in GLContextEGL::createSurfacelessContext() (for EGL_KHR_surfaceless_context and EGL_KHR_surfaceless_opengl) and in WaylandCompositor::initializeEGL() (for EGL_KHR_image_base). GLPlatformContext::supportsEGLExtension() does it correctly, but it seems to belong to a separate tree of GL context types (GLPlatformContext, GLXOffscreenContext and EGLOffscreenContext) which is are not used by the GTK+ port (which uses GLContext, GLContextGLX and GLContextEGL, usually by way of GraphicsContext3D).
Created attachment 292159 [details] Patch
Committed r207614: <http://trac.webkit.org/changeset/207614>