Title: [237018] trunk
Revision
237018
Author
[email protected]
Date
2018-10-10 15:25:17 -0700 (Wed, 10 Oct 2018)

Log Message

Only report the supported WebGL version
https://bugs.webkit.org/show_bug.cgi?id=190434
<rdar://problem/45024677>

Reviewed by Dean Jackson.

Source/WebCore:

Tested by fast/canvas/webgl/gl-getstring.html

Revise getParameter(gl.VERSION) to only return the WebGL version without the hardware and
driver-specific details available through the low-level OpenGL driver interface. These details
are not needed for WebGL use and expose information about the user's system that we do not
need to share.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::getParameter):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getParameter):

LayoutTests:

* fast/canvas/webgl/gl-getstring-expected.txt:
* fast/canvas/webgl/gl-getstring.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (237017 => 237018)


--- trunk/LayoutTests/ChangeLog	2018-10-10 21:23:42 UTC (rev 237017)
+++ trunk/LayoutTests/ChangeLog	2018-10-10 22:25:17 UTC (rev 237018)
@@ -1,3 +1,14 @@
+2018-10-10  Brent Fulgham  <[email protected]>
+
+        Only report the supported WebGL version
+        https://bugs.webkit.org/show_bug.cgi?id=190434
+        <rdar://problem/45024677>
+
+        Reviewed by Dean Jackson.
+
+        * fast/canvas/webgl/gl-getstring-expected.txt:
+        * fast/canvas/webgl/gl-getstring.html:
+
 2018-10-10  Tim Horton  <[email protected]>
 
         Share more WKShareSheet code between macOS and iOS, and fix a few bugs

Modified: trunk/LayoutTests/fast/canvas/webgl/gl-getstring-expected.txt (237017 => 237018)


--- trunk/LayoutTests/fast/canvas/webgl/gl-getstring-expected.txt	2018-10-10 21:23:42 UTC (rev 237017)
+++ trunk/LayoutTests/fast/canvas/webgl/gl-getstring-expected.txt	2018-10-10 22:25:17 UTC (rev 237018)
@@ -7,6 +7,7 @@
 PASS context exists
 
 PASS getParameter(gl.VERSION) correctly started with WebGL 1.0
+PASS gl.getParameter(gl.VERSION) is webGLVersion
 PASS getParameter(gl.SHADING_LANGUAGE_VERSION) correctly started with WebGL GLSL ES 1.0
 PASS gl.getParameter(gl.VENDOR) is non-null.
 PASS gl.getParameter(gl.RENDERER) is non-null.

Modified: trunk/LayoutTests/fast/canvas/webgl/gl-getstring.html (237017 => 237018)


--- trunk/LayoutTests/fast/canvas/webgl/gl-getstring.html	2018-10-10 21:23:42 UTC (rev 237017)
+++ trunk/LayoutTests/fast/canvas/webgl/gl-getstring.html	2018-10-10 22:25:17 UTC (rev 237018)
@@ -17,6 +17,8 @@
 debug("");
 debug("Canvas.getContext");
 
+var webGLVersion = "WebGL 1.0";
+
 var gl = create3DContext(document.getElementById("canvas"));
 if (!gl) {
   testFailed("context does not exist");
@@ -24,7 +26,8 @@
   testPassed("context exists");
 
   debug("");
-  checkPrefix("WebGL 1.0", "VERSION");
+  checkPrefix(webGLVersion, "VERSION");
+  shouldBe("gl.getParameter(gl.VERSION)", "webGLVersion");
   checkPrefix("WebGL GLSL ES 1.0", "SHADING_LANGUAGE_VERSION");
   shouldBeNonNull("gl.getParameter(gl.VENDOR)");
   shouldBeNonNull("gl.getParameter(gl.RENDERER)");

Modified: trunk/Source/WebCore/ChangeLog (237017 => 237018)


--- trunk/Source/WebCore/ChangeLog	2018-10-10 21:23:42 UTC (rev 237017)
+++ trunk/Source/WebCore/ChangeLog	2018-10-10 22:25:17 UTC (rev 237018)
@@ -1,3 +1,23 @@
+2018-10-10  Brent Fulgham  <[email protected]>
+
+        Only report the supported WebGL version
+        https://bugs.webkit.org/show_bug.cgi?id=190434
+        <rdar://problem/45024677>
+
+        Reviewed by Dean Jackson.
+
+        Tested by fast/canvas/webgl/gl-getstring.html
+
+        Revise getParameter(gl.VERSION) to only return the WebGL version without the hardware and
+        driver-specific details available through the low-level OpenGL driver interface. These details
+        are not needed for WebGL use and expose information about the user's system that we do not
+        need to share.
+
+        * html/canvas/WebGL2RenderingContext.cpp:
+        (WebCore::WebGL2RenderingContext::getParameter):
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::getParameter):
+
 2018-10-10  Yusuke Suzuki  <[email protected]>
 
         Unreviewed, add missing headers for inline functions

Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (237017 => 237018)


--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2018-10-10 21:23:42 UTC (rev 237017)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2018-10-10 22:25:17 UTC (rev 237018)
@@ -1938,7 +1938,7 @@
     case GraphicsContext3D::VENDOR:
         return String { "WebKit"_s };
     case GraphicsContext3D::VERSION:
-        return "WebGL 2.0 (" + m_context->getString(GraphicsContext3D::VERSION) + ")";
+        return String { "WebGL 2.0" };
     case GraphicsContext3D::VIEWPORT:
         return getWebGLIntArrayParameter(pname);
     case WebGLDebugRendererInfo::UNMASKED_RENDERER_WEBGL:

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (237017 => 237018)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2018-10-10 21:23:42 UTC (rev 237017)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2018-10-10 22:25:17 UTC (rev 237018)
@@ -588,7 +588,7 @@
     case GraphicsContext3D::VENDOR:
         return String { "WebKit"_s };
     case GraphicsContext3D::VERSION:
-        return "WebGL 1.0 (" + m_context->getString(GraphicsContext3D::VERSION) + ")";
+        return String { "WebGL 1.0" };
     case GraphicsContext3D::VIEWPORT:
         return getWebGLIntArrayParameter(pname);
     case Extensions3D::FRAGMENT_SHADER_DERIVATIVE_HINT_OES: // OES_standard_derivatives
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to