Log Message
Disallow passing null data to uniform1uiv() and friends. https://bugs.webkit.org/show_bug.cgi?id=176777
Patch by Ms2ger <ms2...@igalia.com> on 2017-09-12 Reviewed by Sam Weinig. This matches the specification as well as Gecko and Chromium. Source/WebCore: Test: fast/canvas/webgl/webgl2/bindings.html * html/canvas/WebGL2RenderingContext.idl: LayoutTests: * fast/canvas/webgl/webgl2/bindings-expected.txt: Added. * fast/canvas/webgl/webgl2/bindings.html: Added. * platform/gtk/TestExpectations: disable test.
Modified Paths
- trunk/LayoutTests/ChangeLog
- trunk/LayoutTests/platform/gtk/TestExpectations
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl
Added Paths
- trunk/LayoutTests/fast/canvas/webgl/webgl2/
- trunk/LayoutTests/fast/canvas/webgl/webgl2/bindings-expected.txt
- trunk/LayoutTests/fast/canvas/webgl/webgl2/bindings.html
Diff
Modified: trunk/LayoutTests/ChangeLog (221914 => 221915)
--- trunk/LayoutTests/ChangeLog 2017-09-12 14:53:18 UTC (rev 221914)
+++ trunk/LayoutTests/ChangeLog 2017-09-12 14:55:00 UTC (rev 221915)
@@ -1,3 +1,16 @@
+2017-09-12 Ms2ger <ms2...@igalia.com>
+
+ Disallow passing null data to uniform1uiv() and friends.
+ https://bugs.webkit.org/show_bug.cgi?id=176777
+
+ Reviewed by Sam Weinig.
+
+ This matches the specification as well as Gecko and Chromium.
+
+ * fast/canvas/webgl/webgl2/bindings-expected.txt: Added.
+ * fast/canvas/webgl/webgl2/bindings.html: Added.
+ * platform/gtk/TestExpectations: disable test.
+
2017-09-12 Zan Dobersek <zdober...@igalia.com>
[EME] Implement CDMInstanceClearKey::requestLicense()
Added: trunk/LayoutTests/fast/canvas/webgl/webgl2/bindings-expected.txt (0 => 221915)
--- trunk/LayoutTests/fast/canvas/webgl/webgl2/bindings-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/canvas/webgl/webgl2/bindings-expected.txt 2017-09-12 14:55:00 UTC (rev 221915)
@@ -0,0 +1,12 @@
+
+PASS uniform1uiv with null data
+PASS uniform2uiv with null data
+PASS uniform3uiv with null data
+PASS uniform4uiv with null data
+PASS uniformMatrix2x3fv with null data
+PASS uniformMatrix3x2fv with null data
+PASS uniformMatrix2x4fv with null data
+PASS uniformMatrix4x2fv with null data
+PASS uniformMatrix3x4fv with null data
+PASS uniformMatrix4x3fv with null data
+
Added: trunk/LayoutTests/fast/canvas/webgl/webgl2/bindings.html (0 => 221915)
--- trunk/LayoutTests/fast/canvas/webgl/webgl2/bindings.html (rev 0)
+++ trunk/LayoutTests/fast/canvas/webgl/webgl2/bindings.html 2017-09-12 14:55:00 UTC (rev 221915)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>WebGL2RenderingContext: IDL bindings</title>
+<script src=""
+<script src=""
+<div id="log"></div>
+<script>
+let context, error_methods = [];
+setup(function() {
+ window.internals.settings.setWebGL2Enabled(true);
+
+ context = document.createElement("canvas").getContext("webgl2");
+ if (!context) {
+ throw new Error("Could not create webgl2 context");
+ }
+
+ for (let i = 1; i <= 4; ++i) {
+ error_methods.push([`uniform${i}uiv`, [null, null], `uniform${i}uiv with null data`]);
+ }
+ for (let dim of ["2x3", "3x2", "2x4", "4x2", "3x4", "4x3"]) {
+ error_methods.push([`uniformMatrix${dim}fv`, [null, false, null], `uniformMatrix${dim}fv with null data`]);
+ }
+});
+
+for (var [method, args, name] of error_methods) {
+ test(function() {
+ assert_throws(new TypeError(), () => context[method](...args));
+ }, name);
+}
+</script>
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (221914 => 221915)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2017-09-12 14:53:18 UTC (rev 221914)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2017-09-12 14:55:00 UTC (rev 221915)
@@ -581,6 +581,7 @@
# WebGL 2.0 still not enabled
webkit.org/b/166536 webgl/webgl2-rendering-context-defined.html [ Skip ]
webkit.org/b/166536 webgl/webgl2-rendering-context-obtain.html [ Skip ]
+webkit.org/b/166536 fast/canvas/webgl/webgl2/ [ Skip ]
webkit.org/b/166536 fast/canvas/webgl/webgl2-buffer-targets.html [ Skip ]
webkit.org/b/166536 fast/canvas/webgl/webgl2-buffers.html [ Skip ]
webkit.org/b/166536 fast/canvas/webgl/webgl2-context-creation.html [ Skip ]
Modified: trunk/Source/WebCore/ChangeLog (221914 => 221915)
--- trunk/Source/WebCore/ChangeLog 2017-09-12 14:53:18 UTC (rev 221914)
+++ trunk/Source/WebCore/ChangeLog 2017-09-12 14:55:00 UTC (rev 221915)
@@ -1,3 +1,16 @@
+2017-09-12 Ms2ger <ms2...@igalia.com>
+
+ Disallow passing null data to uniform1uiv() and friends.
+ https://bugs.webkit.org/show_bug.cgi?id=176777
+
+ Reviewed by Sam Weinig.
+
+ This matches the specification as well as Gecko and Chromium.
+
+ Test: fast/canvas/webgl/webgl2/bindings.html
+
+ * html/canvas/WebGL2RenderingContext.idl:
+
2017-09-12 Sam Weinig <s...@webkit.org>
[Cleanup] Follow up cleanup for DOMFormData implementation
Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl (221914 => 221915)
--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl 2017-09-12 14:53:18 UTC (rev 221914)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl 2017-09-12 14:55:00 UTC (rev 221915)
@@ -377,16 +377,16 @@
void uniform2ui(WebGLUniformLocation? location, GLuint v0, GLuint v1);
void uniform3ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2);
void uniform4ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
- void uniform1uiv(WebGLUniformLocation? location, Uint32Array? value);
- void uniform2uiv(WebGLUniformLocation? location, Uint32Array? value);
- void uniform3uiv(WebGLUniformLocation? location, Uint32Array? value);
- void uniform4uiv(WebGLUniformLocation? location, Uint32Array? value);
- void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array? value);
- void uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array? value);
- void uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array? value);
- void uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array? value);
- void uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array? value);
- void uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array? value);
+ void uniform1uiv(WebGLUniformLocation? location, Uint32Array value);
+ void uniform2uiv(WebGLUniformLocation? location, Uint32Array value);
+ void uniform3uiv(WebGLUniformLocation? location, Uint32Array value);
+ void uniform4uiv(WebGLUniformLocation? location, Uint32Array value);
+ void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
+ void uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
+ void uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
+ void uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
+ void uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
+ void uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
void vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
void vertexAttribI4iv(GLuint index, Int32Array? v);
void vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes