[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

zmo at google.com zmo at google.com
Wed Dec 22 12:20:41 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 02436edca5455490e3cf34712ad3b17c1ac5211b
Author: zmo at google.com <zmo at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 19 18:59:21 2010 +0000

    2010-08-18  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Kenneth Russell.
    
            Implement strict type checking in js bindings for WebGL functions
            https://bugs.webkit.org/show_bug.cgi?id=44202
    
            Test: fast/canvas/webgl/bad-arguments-test.html
    
            * bindings/js/JSWebGLRenderingContextCustom.cpp: Add type check for wrapper types and DOMString and throw error in case of mismatch.
            (WebCore::JSWebGLRenderingContext::getAttachedShaders):
            (WebCore::JSWebGLRenderingContext::getProgramParameter):
            (WebCore::JSWebGLRenderingContext::getShaderParameter):
            (WebCore::JSWebGLRenderingContext::getUniform):
            (WebCore::dataFunctionf):
            (WebCore::dataFunctioni):
            (WebCore::dataFunctionMatrix):
            * bindings/scripts/CodeGeneratorJS.pm: Ditto.
            * bindings/scripts/CodeGeneratorV8.pm: Ditto.
            * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: Ditto.
            (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
            (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
            (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
            (WebCore::V8WebGLRenderingContext::getUniformCallback):
            (WebCore::vertexAttribAndUniformHelperf):
            (WebCore::uniformHelperi):
            (WebCore::uniformMatrixHelper):
            * html/canvas/WebGLRenderingContext.idl: Add attribute StrictTypeChecking for WebGL functions.
    2010-08-18  Zhenyao Mo  <zmo at google.com>
    
            Reviewed by Kenneth Russell.
    
            Implement strict type checking in js bindings for WebGL functions
            https://bugs.webkit.org/show_bug.cgi?id=44202
    
            * fast/canvas/webgl/bad-arguments-test-expected.txt: Added.
            * fast/canvas/webgl/bad-arguments-test.html: Added.
            * fast/canvas/webgl/error-reporting-expected.txt: Fix bugs due to strict type checking in the js bindings.
            * fast/canvas/webgl/error-reporting.html: ditto.
            * fast/canvas/webgl/gl-object-get-calls-expected.txt: ditto.
            * fast/canvas/webgl/gl-object-get-calls.html: ditto.
            * fast/canvas/webgl/null-object-behaviour-expected.txt: ditto.
            * fast/canvas/webgl/null-object-behaviour.html: ditto.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65689 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 92b3863..ffedce5 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-18  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Kenneth Russell.
+
+        Implement strict type checking in js bindings for WebGL functions
+        https://bugs.webkit.org/show_bug.cgi?id=44202
+
+        * fast/canvas/webgl/bad-arguments-test-expected.txt: Added.
+        * fast/canvas/webgl/bad-arguments-test.html: Added.
+        * fast/canvas/webgl/error-reporting-expected.txt: Fix bugs due to strict type checking in the js bindings.
+        * fast/canvas/webgl/error-reporting.html: ditto.
+        * fast/canvas/webgl/gl-object-get-calls-expected.txt: ditto.
+        * fast/canvas/webgl/gl-object-get-calls.html: ditto.
+        * fast/canvas/webgl/null-object-behaviour-expected.txt: ditto.
+        * fast/canvas/webgl/null-object-behaviour.html: ditto.
+
 2010-08-19  John Gregg  <johnnyg at google.com>
 
         Unreviewed, test expectations.
diff --git a/LayoutTests/fast/canvas/webgl/bad-arguments-test-expected.txt b/LayoutTests/fast/canvas/webgl/bad-arguments-test-expected.txt
new file mode 100644
index 0000000..208bbb6
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/bad-arguments-test-expected.txt
@@ -0,0 +1,119 @@
+Tests calling WebGL APIs with wrong argument types
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+PASS Program Compiled
+PASS Shader Compiled
+PASS getUniformLocation succeeded
+PASS context.compileShader(argument) threw exception TypeError: Type error.
+PASS context.linkProgram(argument) threw exception TypeError: Type error.
+PASS context.attachShader(argument) threw exception TypeError: Type error.
+PASS context.attachShader(program, argument) threw exception TypeError: Type error.
+PASS context.attachShader(argument, shader) threw exception TypeError: Type error.
+PASS context.detachShader(program, argument) threw exception TypeError: Type error.
+PASS context.detachShader(argument, shader) threw exception TypeError: Type error.
+PASS context.useProgram(argument) threw exception TypeError: Type error.
+PASS context.shaderSource(argument, 'foo') threw exception TypeError: Type error.
+PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Type error.
+PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Type error.
+PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Type error.
+PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Type error.
+PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Type error.
+PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) threw exception TypeError: Type error.
+PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) threw exception TypeError: Type error.
+PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) threw exception TypeError: Type error.
+PASS context.uniform2iv(argument, new Int32Array([0, 0])) threw exception TypeError: Type error.
+PASS context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0])) threw exception TypeError: Type error.
+PASS context.getProgramParameter(argument, 0) threw exception TypeError: Type error.
+PASS context.getShaderParameter(argument, 0) threw exception TypeError: Type error.
+PASS context.getUniform(argument, loc) threw exception TypeError: Type error.
+PASS context.getUniform(program, argument) threw exception TypeError: Type error.
+PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Type error.
+PASS context.getProgramInfoLog(argument) threw exception TypeError: Type error.
+PASS context.getShaderInfoLog(argument) threw exception TypeError: Type error.
+PASS context.getShaderSource(argument) threw exception TypeError: Type error.
+PASS context.compileShader(argument) threw exception TypeError: Type error.
+PASS context.linkProgram(argument) threw exception TypeError: Type error.
+PASS context.attachShader(argument) threw exception TypeError: Type error.
+PASS context.attachShader(program, argument) threw exception TypeError: Type error.
+PASS context.attachShader(argument, shader) threw exception TypeError: Type error.
+PASS context.detachShader(program, argument) threw exception TypeError: Type error.
+PASS context.detachShader(argument, shader) threw exception TypeError: Type error.
+PASS context.useProgram(argument) threw exception TypeError: Type error.
+PASS context.shaderSource(argument, 'foo') threw exception TypeError: Type error.
+PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Type error.
+PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Type error.
+PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Type error.
+PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Type error.
+PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Type error.
+PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) threw exception TypeError: Type error.
+PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) threw exception TypeError: Type error.
+PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) threw exception TypeError: Type error.
+PASS context.uniform2iv(argument, new Int32Array([0, 0])) threw exception TypeError: Type error.
+PASS context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0])) threw exception TypeError: Type error.
+PASS context.getProgramParameter(argument, 0) threw exception TypeError: Type error.
+PASS context.getShaderParameter(argument, 0) threw exception TypeError: Type error.
+PASS context.getUniform(argument, loc) threw exception TypeError: Type error.
+PASS context.getUniform(program, argument) threw exception TypeError: Type error.
+PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Type error.
+PASS context.getProgramInfoLog(argument) threw exception TypeError: Type error.
+PASS context.getShaderInfoLog(argument) threw exception TypeError: Type error.
+PASS context.getShaderSource(argument) threw exception TypeError: Type error.
+PASS context.compileShader(argument) is undefined.
+PASS context.linkProgram(argument) is undefined.
+PASS context.attachShader(argument) is undefined.
+PASS context.attachShader(program, argument) is undefined.
+PASS context.attachShader(argument, shader) is undefined.
+PASS context.detachShader(program, argument) is undefined.
+PASS context.detachShader(argument, shader) is undefined.
+PASS context.useProgram(argument) is undefined.
+PASS context.shaderSource(argument, 'foo') is undefined.
+PASS context.bindAttribLocation(argument, 0, 'foo') is undefined.
+PASS context.bindBuffer(context.ARRAY_BUFFER, argument) is undefined.
+PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) is undefined.
+PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) is undefined.
+PASS context.bindTexture(context.TEXTURE_2D, argument) is undefined.
+PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) is undefined.
+PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) is undefined.
+PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) is undefined.
+PASS context.uniform2iv(argument, new Int32Array([0, 0])) is undefined.
+PASS context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0])) is undefined.
+PASS context.getProgramParameter(argument, 0) is null
+PASS context.getShaderParameter(argument, 0) is null
+PASS context.getUniform(argument, loc) is null
+PASS context.getUniform(program, argument) is null
+PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') is null
+PASS context.getProgramInfoLog(argument) is ''
+PASS context.getShaderInfoLog(argument) is ''
+PASS context.getShaderSource(argument) is ''
+PASS context.compileShader(argument) is undefined.
+PASS context.linkProgram(argument) is undefined.
+PASS context.attachShader(argument) is undefined.
+PASS context.attachShader(program, argument) is undefined.
+PASS context.attachShader(argument, shader) is undefined.
+PASS context.detachShader(program, argument) is undefined.
+PASS context.detachShader(argument, shader) is undefined.
+PASS context.useProgram(argument) is undefined.
+PASS context.shaderSource(argument, 'foo') is undefined.
+PASS context.bindAttribLocation(argument, 0, 'foo') is undefined.
+PASS context.bindBuffer(context.ARRAY_BUFFER, argument) is undefined.
+PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) is undefined.
+PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) is undefined.
+PASS context.bindTexture(context.TEXTURE_2D, argument) is undefined.
+PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) is undefined.
+PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) is undefined.
+PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) is undefined.
+PASS context.uniform2iv(argument, new Int32Array([0, 0])) is undefined.
+PASS context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0])) is undefined.
+PASS context.getProgramParameter(argument, 0) is null
+PASS context.getShaderParameter(argument, 0) is null
+PASS context.getUniform(argument, loc) is null
+PASS context.getUniform(program, argument) is null
+PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') is null
+PASS context.getProgramInfoLog(argument) is ''
+PASS context.getShaderInfoLog(argument) is ''
+PASS context.getShaderSource(argument) is ''
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/canvas/webgl/bad-arguments-test.html b/LayoutTests/fast/canvas/webgl/bad-arguments-test.html
new file mode 100644
index 0000000..4e86478
--- /dev/null
+++ b/LayoutTests/fast/canvas/webgl/bad-arguments-test.html
@@ -0,0 +1,92 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css"/>
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="resources/webgl-test.js"></script>
+<script src="resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+var wtu = WebGLTestUtils;
+description("Tests calling WebGL APIs with wrong argument types");
+
+var context = wtu.create3DContext();
+var program = wtu.loadStandardProgram(context);
+var shader = wtu.loadStandardVertexShader(context);
+var shouldGenerateGLError = wtu.shouldGenerateGLError;
+
+assertMsg(program != null, "Program Compiled");
+assertMsg(shader != null, "Shader Compiled");
+
+var loc = context.getUniformLocation(program, "u_modelViewProjMatrix");
+assertMsg(loc != null, "getUniformLocation succeeded");
+
+var arguments = [
+  { value: "foo",
+    throw: true },
+  { value: 0,
+    throw: true },
+  { value: null,
+    throw: false },
+  { value: undefined,
+    throw: false }
+];
+
+var argument;
+
+function shouldBeEmptyString(command) {
+  shouldBe(command, "''");
+}
+
+for (var i = 0; i < arguments.length; ++i) {
+  var func, func2, func3;
+  if (arguments[i].throw) {
+    func = shouldThrow;
+    func2 = shouldThrow;
+    func3 = shouldThrow;
+  } else {
+    func = shouldBeUndefined;
+    func2 = shouldBeNull;
+    func3 = shouldBeEmptyString;
+  }
+  argument = arguments[i].value;
+  func("context.compileShader(argument)");
+  func("context.linkProgram(argument)");
+  func("context.attachShader(argument)");
+  func("context.attachShader(program, argument)");
+  func("context.attachShader(argument, shader)");
+  func("context.detachShader(program, argument)");
+  func("context.detachShader(argument, shader)");
+  func("context.useProgram(argument)");
+  func("context.shaderSource(argument, 'foo')");
+  func("context.bindAttribLocation(argument, 0, 'foo')");
+  func("context.bindBuffer(context.ARRAY_BUFFER, argument)");
+  func("context.bindFramebuffer(context.FRAMEBUFFER, argument)");
+  func("context.bindRenderbuffer(context.RENDERBUFFER, argument)");
+  func("context.bindTexture(context.TEXTURE_2D, argument)");
+  func("context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument)");
+  func("context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0)");
+  func("context.uniform2fv(argument, new Float32Array([0.0, 0.0]))");
+  func("context.uniform2iv(argument, new Int32Array([0, 0]))");
+  func("context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0]))");
+
+  func2("context.getProgramParameter(argument, 0)");
+  func2("context.getShaderParameter(argument, 0)");
+  func2("context.getUniform(argument, loc)");
+  func2("context.getUniform(program, argument)");
+  func2("context.getUniformLocation(argument, 'u_modelViewProjMatrix')");
+
+  func3("context.getProgramInfoLog(argument)");
+  func3("context.getShaderInfoLog(argument)");
+  func3("context.getShaderSource(argument)");
+}
+
+successfullyParsed = true;
+</script>
+
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/canvas/webgl/error-reporting-expected.txt b/LayoutTests/fast/canvas/webgl/error-reporting-expected.txt
index 108d8bb..a77ff40 100644
--- a/LayoutTests/fast/canvas/webgl/error-reporting-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/error-reporting-expected.txt
@@ -2,7 +2,7 @@ Tests generation of synthetic and real GL errors
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-PASS context.getError() is 0
+PASS getError was expected value: NO_ERROR : 
 Testing getActiveAttrib
 PASS context.getActiveAttrib(null, 2) is null
 PASS getError was expected value: INVALID_VALUE : 
@@ -18,12 +18,12 @@ PASS context.getActiveUniform(program, 50) is null
 PASS getError was expected value: INVALID_VALUE : 
 PASS getError was expected value: NO_ERROR : 
 Testing attempts to manipulate the default framebuffer
-PASS context.bindFramebuffer(context.FRAMEBUFFER, 0) is undefined.
+PASS context.bindFramebuffer(context.FRAMEBUFFER, null) is undefined.
 PASS getError was expected value: NO_ERROR : 
-PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, 0) is undefined.
+PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, null) is undefined.
 PASS getError was expected value: INVALID_OPERATION : 
 PASS getError was expected value: NO_ERROR : 
-PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, 0, 0) is undefined.
+PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, null, 0) is undefined.
 PASS getError was expected value: INVALID_OPERATION : 
 PASS getError was expected value: NO_ERROR : 
 PASS successfullyParsed is true
diff --git a/LayoutTests/fast/canvas/webgl/error-reporting.html b/LayoutTests/fast/canvas/webgl/error-reporting.html
index b60b3b5..29888a0 100644
--- a/LayoutTests/fast/canvas/webgl/error-reporting.html
+++ b/LayoutTests/fast/canvas/webgl/error-reporting.html
@@ -21,7 +21,7 @@ var program = loadStandardProgram(context);
 // discovered in the synthetic error generation and in the WebGL
 // implementation itself.
 
-shouldBe("context.getError()", "0");
+glErrorShouldBe(context, context.NO_ERROR);
 
 debug("Testing getActiveAttrib");
 // Synthetic OpenGL error
@@ -48,14 +48,14 @@ glErrorShouldBe(context, context.INVALID_VALUE);
 glErrorShouldBe(context, context.NO_ERROR);
 
 debug("Testing attempts to manipulate the default framebuffer");
-shouldBeUndefined("context.bindFramebuffer(context.FRAMEBUFFER, 0)");
+shouldBeUndefined("context.bindFramebuffer(context.FRAMEBUFFER, null)");
 glErrorShouldBe(context, context.NO_ERROR);
-shouldBeUndefined("context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, 0)");
+shouldBeUndefined("context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, null)");
 // Synthetic OpenGL error
 glErrorShouldBe(context, context.INVALID_OPERATION);
 // Error state should be clear by this point
 glErrorShouldBe(context, context.NO_ERROR);
-shouldBeUndefined("context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, 0, 0)");
+shouldBeUndefined("context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, null, 0)");
 // Synthetic OpenGL error
 glErrorShouldBe(context, context.INVALID_OPERATION);
 // Error state should be clear by this point
diff --git a/LayoutTests/fast/canvas/webgl/gl-object-get-calls-expected.txt b/LayoutTests/fast/canvas/webgl/gl-object-get-calls-expected.txt
index bfa3d07..f83b2c8 100644
--- a/LayoutTests/fast/canvas/webgl/gl-object-get-calls-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/gl-object-get-calls-expected.txt
@@ -4,11 +4,11 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS shaders.length is 2
 PASS shaders[0] == standardVert && shaders[1] == standardFrag || shaders[1] == standardVert && shaders[0] == standardFrag is true
-PASS gl.getError() is gl.NO_ERROR
+PASS getError was expected value: NO_ERROR : 
 PASS gl.getAttachedShaders(null) is undefined.
-PASS gl.getError() is gl.INVALID_VALUE
-PASS gl.getAttachedShaders(standardVert) is undefined.
-PASS gl.getError() is gl.INVALID_VALUE
+PASS getError was expected value: INVALID_VALUE : 
+PASS gl.getAttachedShaders(standardVert) threw exception TypeError: Type error.
+PASS getError was expected value: NO_ERROR : 
 PASS gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE) is 16
 PASS gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE) is gl.DYNAMIC_DRAW
 PASS getError was expected value: NO_ERROR : 
@@ -75,9 +75,11 @@ PASS gl.getUniform(matProgram, mval4Loc) is [14, 15, 16, 17, 18, 19, 20, 21, 22,
 PASS gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) is buffer
 PASS gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_ENABLED) is true
 PASS gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_SIZE) is 4
-PASS (gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_STRIDE) == 0) || (gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_STRIDE) == 4 * sizeInBytes(gl.FLOAT)) is true
+PASS gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_STRIDE) is 0
 PASS gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_TYPE) is gl.FLOAT
 PASS gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_NORMALIZED) is false
+PASS gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_STRIDE) is 36
+PASS gl.getVertexAttribOffset(1, gl.VERTEX_ATTRIB_ARRAY_POINTER) is 12
 PASS gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_ENABLED) is false
 PASS gl.getVertexAttrib(1, gl.CURRENT_VERTEX_ATTRIB) is [5, 6, 7, 8]
 PASS getError was expected value: NO_ERROR : 
diff --git a/LayoutTests/fast/canvas/webgl/gl-object-get-calls.html b/LayoutTests/fast/canvas/webgl/gl-object-get-calls.html
index 56c4e03..9832a69 100644
--- a/LayoutTests/fast/canvas/webgl/gl-object-get-calls.html
+++ b/LayoutTests/fast/canvas/webgl/gl-object-get-calls.html
@@ -39,11 +39,11 @@ gl.linkProgram(standardProgram);
 var shaders = gl.getAttachedShaders(standardProgram);
 shouldBe('shaders.length', '2');
 shouldBeTrue('shaders[0] == standardVert && shaders[1] == standardFrag || shaders[1] == standardVert && shaders[0] == standardFrag');
-shouldBe('gl.getError()', 'gl.NO_ERROR');
+glErrorShouldBe(gl, gl.NO_ERROR);
 shouldBeUndefined('gl.getAttachedShaders(null)');
-shouldBe('gl.getError()', 'gl.INVALID_VALUE');
-shouldBeUndefined('gl.getAttachedShaders(standardVert)');
-shouldBe('gl.getError()', 'gl.INVALID_VALUE');
+glErrorShouldBe(gl, gl.INVALID_VALUE);
+shouldThrow('gl.getAttachedShaders(standardVert)');
+glErrorShouldBe(gl, gl.NO_ERROR);
 
 // Test getBufferParameter
 var buffer = gl.createBuffer();
@@ -214,9 +214,13 @@ gl.vertexAttribPointer(1, 4, gl.FLOAT, false, 0, 0);
 shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)', 'buffer');
 shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_ENABLED)', 'true');
 shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_SIZE)', '4');
-shouldBe('(gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_STRIDE) == 0) || (gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_STRIDE) == 4 * sizeInBytes(gl.FLOAT))', 'true');
+// Stride MUST be the value the user put in.
+shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_STRIDE)', '0');
 shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_TYPE)', 'gl.FLOAT');
 shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_NORMALIZED)', 'false');
+gl.vertexAttribPointer(1, 4, gl.FLOAT, false, 36, 12);
+shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_STRIDE)', '36');
+shouldBe('gl.getVertexAttribOffset(1, gl.VERTEX_ATTRIB_ARRAY_POINTER)', '12');
 gl.disableVertexAttribArray(1);
 shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_ENABLED)', 'false');
 gl.vertexAttrib4f(1, 5, 6, 7, 8);
diff --git a/LayoutTests/fast/canvas/webgl/null-object-behaviour-expected.txt b/LayoutTests/fast/canvas/webgl/null-object-behaviour-expected.txt
index f8f14f7..66097aa 100644
--- a/LayoutTests/fast/canvas/webgl/null-object-behaviour-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/null-object-behaviour-expected.txt
@@ -14,10 +14,10 @@ PASS context.detachShader(undefined, shader) was expected value: INVALID_VALUE.
 PASS context.shaderSource() was expected value: INVALID_VALUE.
 PASS context.shaderSource(undefined, 'foo') was expected value: INVALID_VALUE.
 PASS context.bindAttribLocation(undefined, 0, 'foo') was expected value: INVALID_VALUE.
-PASS context.bindBuffer(context.ARRAY_BUFFER, 0) was expected value: NO_ERROR.
-PASS context.bindFramebuffer(context.FRAMEBUFFER, 0) was expected value: NO_ERROR.
-PASS context.bindRenderbuffer(context.RENDERBUFFER, 0) was expected value: NO_ERROR.
-PASS context.bindTexture(context.TEXTURE_2D, 0) was expected value: NO_ERROR.
+PASS context.bindBuffer(context.ARRAY_BUFFER, 0) threw exception TypeError: Type error.
+PASS context.bindFramebuffer(context.FRAMEBUFFER, 0) threw exception TypeError: Type error.
+PASS context.bindRenderbuffer(context.RENDERBUFFER, 0) threw exception TypeError: Type error.
+PASS context.bindTexture(context.TEXTURE_2D, 0) threw exception TypeError: Type error.
 PASS context.bindBuffer(context.ARRAY_BUFFER, null) was expected value: NO_ERROR.
 PASS context.bindFramebuffer(context.FRAMEBUFFER, null) was expected value: NO_ERROR.
 PASS context.bindRenderbuffer(context.RENDERBUFFER, null) was expected value: NO_ERROR.
@@ -26,14 +26,14 @@ PASS context.bindBuffer(context.ARRAY_BUFFER, undefined) was expected value: NO_
 PASS context.bindFramebuffer(context.FRAMEBUFFER, undefined) was expected value: NO_ERROR.
 PASS context.bindRenderbuffer(context.RENDERBUFFER, undefined) was expected value: NO_ERROR.
 PASS context.bindTexture(context.TEXTURE_2D, undefined) was expected value: NO_ERROR.
-PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, 0) was expected value: INVALID_OPERATION.
-PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, 0, 0) was expected value: INVALID_OPERATION.
+PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, null) was expected value: INVALID_OPERATION.
+PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, null, 0) was expected value: INVALID_OPERATION.
 PASS context.getProgramParameter(undefined, 0) was expected value: INVALID_VALUE.
 PASS context.getProgramInfoLog(undefined, 0) was expected value: INVALID_VALUE.
 PASS context.getShaderParameter(undefined, 0) was expected value: INVALID_VALUE.
 PASS context.getShaderInfoLog(undefined, 0) was expected value: INVALID_VALUE.
 PASS context.getShaderSource(undefined) was expected value: INVALID_VALUE.
-PASS context.getUniform(undefined, 0) was expected value: INVALID_VALUE.
+PASS context.getUniform(undefined, null) was expected value: INVALID_VALUE.
 PASS context.getUniformLocation(undefined, 'foo') was expected value: INVALID_VALUE.
 
 check with bindings
diff --git a/LayoutTests/fast/canvas/webgl/null-object-behaviour.html b/LayoutTests/fast/canvas/webgl/null-object-behaviour.html
index 2bb9801..48785d5 100644
--- a/LayoutTests/fast/canvas/webgl/null-object-behaviour.html
+++ b/LayoutTests/fast/canvas/webgl/null-object-behaviour.html
@@ -30,10 +30,10 @@ shouldGenerateGLError(context, context.INVALID_VALUE, "context.detachShader(unde
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.shaderSource()");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.shaderSource(undefined, 'foo')");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.bindAttribLocation(undefined, 0, 'foo')");
-shouldGenerateGLError(context, context.NO_ERROR, "context.bindBuffer(context.ARRAY_BUFFER, 0)");
-shouldGenerateGLError(context, context.NO_ERROR, "context.bindFramebuffer(context.FRAMEBUFFER, 0)");
-shouldGenerateGLError(context, context.NO_ERROR, "context.bindRenderbuffer(context.RENDERBUFFER, 0)");
-shouldGenerateGLError(context, context.NO_ERROR, "context.bindTexture(context.TEXTURE_2D, 0)");
+shouldThrow("context.bindBuffer(context.ARRAY_BUFFER, 0)");
+shouldThrow("context.bindFramebuffer(context.FRAMEBUFFER, 0)");
+shouldThrow("context.bindRenderbuffer(context.RENDERBUFFER, 0)");
+shouldThrow("context.bindTexture(context.TEXTURE_2D, 0)");
 shouldGenerateGLError(context, context.NO_ERROR, "context.bindBuffer(context.ARRAY_BUFFER, null)");
 shouldGenerateGLError(context, context.NO_ERROR, "context.bindFramebuffer(context.FRAMEBUFFER, null)");
 shouldGenerateGLError(context, context.NO_ERROR, "context.bindRenderbuffer(context.RENDERBUFFER, null)");
@@ -42,14 +42,14 @@ shouldGenerateGLError(context, context.NO_ERROR, "context.bindBuffer(context.ARR
 shouldGenerateGLError(context, context.NO_ERROR, "context.bindFramebuffer(context.FRAMEBUFFER, undefined)");
 shouldGenerateGLError(context, context.NO_ERROR, "context.bindRenderbuffer(context.RENDERBUFFER, undefined)");
 shouldGenerateGLError(context, context.NO_ERROR, "context.bindTexture(context.TEXTURE_2D, undefined)");
-shouldGenerateGLError(context, context.INVALID_OPERATION, "context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, 0)");
-shouldGenerateGLError(context, context.INVALID_OPERATION, "context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, 0, 0)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, null)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, null, 0)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.getProgramParameter(undefined, 0)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.getProgramInfoLog(undefined, 0)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.getShaderParameter(undefined, 0)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.getShaderInfoLog(undefined, 0)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.getShaderSource(undefined)");
-shouldGenerateGLError(context, context.INVALID_VALUE, "context.getUniform(undefined, 0)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.getUniform(undefined, null)");
 shouldGenerateGLError(context, context.INVALID_VALUE, "context.getUniformLocation(undefined, 'foo')");
 
 debug("");
@@ -64,8 +64,8 @@ shouldGenerateGLError(context, context.NO_ERROR, "context.getTexParameter(contex
 
 debug("");
 debug("check without bindings");
-context.bindBuffer(context.ARRAY_BUFFER, 0);
-context.bindTexture(context.TEXTURE_2D, 0);
+context.bindBuffer(context.ARRAY_BUFFER, null);
+context.bindTexture(context.TEXTURE_2D, null);
 shouldGenerateGLError(context, context.INVALID_OPERATION, "context.bufferData(context.ARRAY_BUFFER, 1, context.STATIC_DRAW)");
 shouldGenerateGLError(context, context.INVALID_OPERATION, "context.getBufferParameter(context.ARRAY_BUFFER, context.BUFFER_SIZE)");
 shouldGenerateGLError(context, context.INVALID_OPERATION, "context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, 1, 1, 0, context.RGBA, context.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]))");
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8776257..eab37bf 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,32 @@
+2010-08-18  Zhenyao Mo  <zmo at google.com>
+
+        Reviewed by Kenneth Russell.
+
+        Implement strict type checking in js bindings for WebGL functions
+        https://bugs.webkit.org/show_bug.cgi?id=44202
+
+        Test: fast/canvas/webgl/bad-arguments-test.html
+
+        * bindings/js/JSWebGLRenderingContextCustom.cpp: Add type check for wrapper types and DOMString and throw error in case of mismatch.
+        (WebCore::JSWebGLRenderingContext::getAttachedShaders):
+        (WebCore::JSWebGLRenderingContext::getProgramParameter):
+        (WebCore::JSWebGLRenderingContext::getShaderParameter):
+        (WebCore::JSWebGLRenderingContext::getUniform):
+        (WebCore::dataFunctionf):
+        (WebCore::dataFunctioni):
+        (WebCore::dataFunctionMatrix):
+        * bindings/scripts/CodeGeneratorJS.pm: Ditto.
+        * bindings/scripts/CodeGeneratorV8.pm: Ditto.
+        * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: Ditto.
+        (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
+        (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
+        (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
+        (WebCore::V8WebGLRenderingContext::getUniformCallback):
+        (WebCore::vertexAttribAndUniformHelperf):
+        (WebCore::uniformHelperi):
+        (WebCore::uniformMatrixHelper):
+        * html/canvas/WebGLRenderingContext.idl: Add attribute StrictTypeChecking for WebGL functions.
+
 2010-08-19  Simon Fraser  <simon.fraser at apple.com>
 
         Fix Chromium build.
diff --git a/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp b/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
index 0342ab6..4b31659 100644
--- a/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
+++ b/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
@@ -167,6 +167,8 @@ JSValue JSWebGLRenderingContext::getAttachedShaders(ExecState* exec)
         return throwSyntaxError(exec);
     ExceptionCode ec = 0;
     WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
+    if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(&JSWebGLProgram::s_info))
+        return throwTypeError(exec);
     WebGLProgram* program = toWebGLProgram(exec->argument(0));
     if (exec->hadException())
         return jsUndefined();
@@ -238,6 +240,8 @@ JSValue JSWebGLRenderingContext::getProgramParameter(ExecState* exec)
 
     ExceptionCode ec = 0;
     WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
+    if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(&JSWebGLProgram::s_info))
+        return throwTypeError(exec);
     WebGLProgram* program = toWebGLProgram(exec->argument(0));
     unsigned pname = exec->argument(1).toInt32(exec);
     if (exec->hadException())
@@ -262,6 +266,8 @@ JSValue JSWebGLRenderingContext::getShaderParameter(ExecState* exec)
 
     ExceptionCode ec = 0;
     WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
+    if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(&JSWebGLShader::s_info))
+        return throwTypeError(exec);
     WebGLShader* shader = toWebGLShader(exec->argument(0));
     unsigned pname = exec->argument(1).toInt32(exec);
     if (exec->hadException())
@@ -286,7 +292,11 @@ JSValue JSWebGLRenderingContext::getUniform(ExecState* exec)
 
     ExceptionCode ec = 0;
     WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
+    if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(&JSWebGLProgram::s_info))
+        return throwTypeError(exec);
     WebGLProgram* program = toWebGLProgram(exec->argument(0));
+    if (exec->argumentCount() > 1 && !exec->argument(1).isUndefinedOrNull() && !exec->argument(1).inherits(&JSWebGLUniformLocation::s_info))
+        return throwTypeError(exec);
     WebGLUniformLocation* loc = toWebGLUniformLocation(exec->argument(1));
     if (exec->hadException())
         return jsUndefined();
@@ -354,9 +364,11 @@ static JSC::JSValue dataFunctionf(DataFunctionToCall f, JSC::ExecState* exec, We
     WebGLUniformLocation* location = 0;
     long index = -1;
     
-    if (functionForUniform(f))
+    if (functionForUniform(f)) {
+        if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(&JSWebGLUniformLocation::s_info))
+            return throwTypeError(exec);
         location = toWebGLUniformLocation(exec->argument(0));
-    else
+    } else
         index = exec->argument(0).toInt32(exec);
 
     if (exec->hadException())
@@ -439,6 +451,8 @@ static JSC::JSValue dataFunctioni(DataFunctionToCall f, JSC::ExecState* exec, We
     if (exec->argumentCount() != 2)
         return throwSyntaxError(exec);
 
+    if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(&JSWebGLUniformLocation::s_info))
+        return throwTypeError(exec);
     WebGLUniformLocation* location = toWebGLUniformLocation(exec->argument(0));
   
     if (exec->hadException())
@@ -502,6 +516,8 @@ static JSC::JSValue dataFunctionMatrix(DataFunctionMatrixToCall f, JSC::ExecStat
     if (exec->argumentCount() != 3)
         return throwSyntaxError(exec);
 
+    if (exec->argumentCount() > 0 && !exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(&JSWebGLUniformLocation::s_info))
+        return throwTypeError(exec);
     WebGLUniformLocation* location = toWebGLUniformLocation(exec->argument(0));
 
     if (exec->hadException())    
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 0b18d95..84e3919 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -1963,6 +1963,20 @@ sub GenerateImplementation
                                 push(@implContent, "    RefPtr<" . $parameter->type . "> $name = ${callbackClassName}::create(asObject(exec->argument($argsIndex)), castedThis->globalObject());\n");
                             }
                         } else {
+                            # For functions with "StrictTypeChecking", if an input parameter's type does not match the signature,
+                            # a TypeError is thrown instead of casting to null.
+                            if ($function->signature->extendedAttributes->{"StrictTypeChecking"}) {
+                                my $argValue = "exec->argument($argsIndex)";
+                                my $argType = $codeGenerator->StripModule($parameter->type);
+                                if (!IsNativeType($argType)) {
+                                    push(@implContent, "    if (exec->argumentCount() > $argsIndex && !${argValue}.isUndefinedOrNull() && !${argValue}.inherits(&JS${argType}::s_info))\n");
+                                    push(@implContent, "        return throwVMTypeError(exec);\n");
+                                } elsif ($codeGenerator->IsStringType($argType)) {
+                                    push(@implContent, "    if (exec->argumentCount() > $argsIndex && !${argValue}.isUndefinedOrNull() && !${argValue}.isString() && !${argValue}.isObject())\n");
+                                    push(@implContent, "        return throwVMTypeError(exec);\n");
+                                }
+                            }
+
                             push(@implContent, "    " . GetNativeTypeFromSignature($parameter) . " $name = " . JSValueToNative($parameter, "exec->argument($argsIndex)") . ";\n");
 
                             # If a parameter is "an index" and it's negative it should throw an INDEX_SIZE_ERR exception.
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index ebbcf8b..56838ca 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -1245,6 +1245,23 @@ END
             }
         } else {
             $implIncludes{"V8BindingMacros.h"} = 1;
+            # For functions with "StrictTypeChecking", if an input parameter's type does not match the signature,
+            # a TypeError is thrown instead of casting to null.
+            if ($function->signature->extendedAttributes->{"StrictTypeChecking"}) {
+                my $argValue = "args[$paramIndex]";
+                my $argType = GetTypeFromSignature($parameter);
+                if (IsWrapperType($argType)) {
+                    push(@implContentDecls, "    if (args.Length() > $paramIndex && !isUndefinedOrNull($argValue) && !V8${argType}::HasInstance($argValue)) {\n");
+                    push(@implContentDecls, "        V8Proxy::throwTypeError();\n");
+                    push(@implContentDecls, "        return notHandledByInterceptor();\n");
+                    push(@implContentDecls, "    }\n");
+                } elsif ($codeGenerator->IsStringType($argType)) {
+                    push(@implContentDecls, "    if (args.Length() > $paramIndex && !isUndefinedOrNull($argValue) && !${argValue}->IsString() && !${argValue}->IsObject()) {\n");
+                    push(@implContentDecls, "        V8Proxy::throwTypeError();\n");
+                    push(@implContentDecls, "        return notHandledByInterceptor();\n");
+                    push(@implContentDecls, "    }\n");
+                }
+            }
             push(@implContentDecls, "    EXCEPTION_BLOCK($nativeType, $parameterName, " .
                  JSValueToNative($parameter, "args[$paramIndex]", BasicTypeCanFailConversion($parameter) ?  "${parameterName}Ok" : undef) . ");\n");
         }
@@ -2988,7 +3005,10 @@ sub RequiresCustomSignature
     if (@{$function->{overloads}} > 1) {
         return 0;
     }
-
+    # Type checking is performed in the generated code
+    if ($function->signature->extendedAttributes->{"StrictTypeChecking"}) {
+      return 0;
+    }
     foreach my $parameter (@{$function->parameters}) {
         if ($parameter->extendedAttributes->{"Optional"} || $parameter->extendedAttributes->{"Callback"}) {
             return 0;
diff --git a/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
index fd6e120..9346a05 100644
--- a/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
@@ -227,6 +227,10 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::getAttachedShadersCallback(const
 
     ExceptionCode ec = 0;
     WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
+    if (args.Length() > 0 && !isUndefinedOrNull(args[0]) && !V8WebGLProgram::HasInstance(args[0])) {
+        V8Proxy::throwTypeError();
+        return notHandledByInterceptor();
+    }
     WebGLProgram* program = V8WebGLProgram::HasInstance(args[0]) ? V8WebGLProgram::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
     Vector<WebGLShader*> shaders;
     bool succeed = context->getAttachedShaders(program, shaders, ec);
@@ -319,6 +323,10 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::getProgramParameterCallback(const
 
     ExceptionCode ec = 0;
     WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
+    if (args.Length() > 0 && !isUndefinedOrNull(args[0]) && !V8WebGLProgram::HasInstance(args[0])) {
+        V8Proxy::throwTypeError();
+        return notHandledByInterceptor();
+    }
     WebGLProgram* program = V8WebGLProgram::HasInstance(args[0]) ? V8WebGLProgram::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
     bool ok;
     unsigned pname = toInt32(args[1], ok);
@@ -351,6 +359,10 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::getShaderParameterCallback(const
 
     ExceptionCode ec = 0;
     WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
+    if (args.Length() > 0 && !isUndefinedOrNull(args[0]) && !V8WebGLShader::HasInstance(args[0])) {
+        V8Proxy::throwTypeError();
+        return notHandledByInterceptor();
+    }
     WebGLShader* shader = V8WebGLShader::HasInstance(args[0]) ? V8WebGLShader::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
     bool ok;
     unsigned pname = toInt32(args[1], ok);
@@ -383,8 +395,16 @@ v8::Handle<v8::Value> V8WebGLRenderingContext::getUniformCallback(const v8::Argu
 
     ExceptionCode ec = 0;
     WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
+    if (args.Length() > 0 && !isUndefinedOrNull(args[0]) && !V8WebGLProgram::HasInstance(args[0])) {
+        V8Proxy::throwTypeError();
+        return notHandledByInterceptor();
+    }
     WebGLProgram* program = V8WebGLProgram::HasInstance(args[0]) ? V8WebGLProgram::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0;
 
+    if (args.Length() > 1 && !isUndefinedOrNull(args[1]) && !V8WebGLUniformLocation::HasInstance(args[1])) {
+        V8Proxy::throwTypeError();
+        return notHandledByInterceptor();
+    }
     bool ok = false;
     WebGLUniformLocation* location = toWebGLUniformLocation(args[1], ok);
 
@@ -452,8 +472,13 @@ static v8::Handle<v8::Value> vertexAttribAndUniformHelperf(const v8::Arguments&
 
     if (isFunctionToCallForAttribute(functionToCall))
         index = toInt32(args[0], ok);
-    else
+    else {
+        if (args.Length() > 0 && !isUndefinedOrNull(args[0]) && !V8WebGLUniformLocation::HasInstance(args[0])) {
+            V8Proxy::throwTypeError();
+            return notHandledByInterceptor();
+        }
         location = toWebGLUniformLocation(args[0], ok);
+    }
 
     WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
 
@@ -526,6 +551,10 @@ static v8::Handle<v8::Value> uniformHelperi(const v8::Arguments& args,
     }
 
     WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
+    if (args.Length() > 0 && !isUndefinedOrNull(args[0]) && !V8WebGLUniformLocation::HasInstance(args[0])) {
+        V8Proxy::throwTypeError();
+        return notHandledByInterceptor();
+    }
     bool ok = false;
     WebGLUniformLocation* location = toWebGLUniformLocation(args[0], ok);
 
@@ -639,6 +668,10 @@ static v8::Handle<v8::Value> uniformMatrixHelper(const v8::Arguments& args,
 
     WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(args.Holder());
 
+    if (args.Length() > 0 && !isUndefinedOrNull(args[0]) && !V8WebGLUniformLocation::HasInstance(args[0])) {
+        V8Proxy::throwTypeError();
+        return notHandledByInterceptor();
+    }
     bool ok = false;
     WebGLUniformLocation* location = toWebGLUniformLocation(args[0], ok);
     
diff --git a/WebCore/html/canvas/WebGLRenderingContext.idl b/WebCore/html/canvas/WebGLRenderingContext.idl
index 960dd0b..7a63752 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.idl
+++ b/WebCore/html/canvas/WebGLRenderingContext.idl
@@ -464,213 +464,210 @@ module html {
         const unsigned int UNPACK_FLIP_Y_WEBGL            = 0x9240;
         const unsigned int UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;
 
-        void         activeTexture(in unsigned long texture) raises(DOMException);
-        void         attachShader(in WebGLProgram program, in WebGLShader shader) raises(DOMException);
-        void         bindAttribLocation(in WebGLProgram program, in unsigned long index, in DOMString name) raises(DOMException);
-        void         bindBuffer(in unsigned long target, in WebGLBuffer buffer) raises(DOMException);
-        void         bindFramebuffer(in unsigned long target, in WebGLFramebuffer framebuffer) raises(DOMException);
-        void         bindRenderbuffer(in unsigned long target, in WebGLRenderbuffer renderbuffer) raises(DOMException);
-        void         bindTexture(in unsigned long target, in WebGLTexture texture) raises(DOMException);
-        void         blendColor(in double red, in double green, in double blue, in double alpha);
-        void         blendEquation( in unsigned long mode );
-        void         blendEquationSeparate(in unsigned long modeRGB, in unsigned long modeAlpha);
-        void         blendFunc(in unsigned long sfactor, in unsigned long dfactor);
-        void         blendFuncSeparate(in unsigned long srcRGB, in unsigned long dstRGB, in unsigned long srcAlpha, in unsigned long dstAlpha);
-        void         bufferData(in unsigned long target, in ArrayBuffer data, in unsigned long usage) raises (DOMException);
-        void         bufferData(in unsigned long target, in ArrayBufferView data, in unsigned long usage) raises (DOMException);
-        void         bufferData(in unsigned long target, in long size, in unsigned long usage) raises (DOMException);
-        void         bufferSubData(in unsigned long target, in long offset, in ArrayBuffer data) raises (DOMException);
-        void         bufferSubData(in unsigned long target, in long offset, in ArrayBufferView data) raises (DOMException);
-
-        unsigned long checkFramebufferStatus(in unsigned long target);
-        void         clear(in unsigned long mask);
-        void         clearColor(in double red, in double green, in double blue, in double alpha);
-        void         clearDepth(in double depth);
-        void         clearStencil(in long s);
-        void         colorMask(in boolean red, in boolean green, in boolean blue, in boolean alpha);
-        void         compileShader(in WebGLShader shader) raises(DOMException);
+        [StrictTypeChecking] void         activeTexture(in unsigned long texture) raises(DOMException);
+        [StrictTypeChecking] void         attachShader(in WebGLProgram program, in WebGLShader shader) raises(DOMException);
+        [StrictTypeChecking] void         bindAttribLocation(in WebGLProgram program, in unsigned long index, in DOMString name) raises(DOMException);
+        [StrictTypeChecking] void         bindBuffer(in unsigned long target, in WebGLBuffer buffer) raises(DOMException);
+        [StrictTypeChecking] void         bindFramebuffer(in unsigned long target, in WebGLFramebuffer framebuffer) raises(DOMException);
+        [StrictTypeChecking] void         bindRenderbuffer(in unsigned long target, in WebGLRenderbuffer renderbuffer) raises(DOMException);
+        [StrictTypeChecking] void         bindTexture(in unsigned long target, in WebGLTexture texture) raises(DOMException);
+        [StrictTypeChecking] void         blendColor(in double red, in double green, in double blue, in double alpha);
+        [StrictTypeChecking] void         blendEquation( in unsigned long mode );
+        [StrictTypeChecking] void         blendEquationSeparate(in unsigned long modeRGB, in unsigned long modeAlpha);
+        [StrictTypeChecking] void         blendFunc(in unsigned long sfactor, in unsigned long dfactor);
+        [StrictTypeChecking] void         blendFuncSeparate(in unsigned long srcRGB, in unsigned long dstRGB, in unsigned long srcAlpha, in unsigned long dstAlpha);
+        [StrictTypeChecking] void         bufferData(in unsigned long target, in ArrayBuffer data, in unsigned long usage) raises (DOMException);
+        [StrictTypeChecking] void         bufferData(in unsigned long target, in ArrayBufferView data, in unsigned long usage) raises (DOMException);
+        [StrictTypeChecking] void         bufferData(in unsigned long target, in long size, in unsigned long usage) raises (DOMException);
+        [StrictTypeChecking] void         bufferSubData(in unsigned long target, in long offset, in ArrayBuffer data) raises (DOMException);
+        [StrictTypeChecking] void         bufferSubData(in unsigned long target, in long offset, in ArrayBufferView data) raises (DOMException);
+
+        [StrictTypeChecking] unsigned long checkFramebufferStatus(in unsigned long target);
+        [StrictTypeChecking] void         clear(in unsigned long mask);
+        [StrictTypeChecking] void         clearColor(in double red, in double green, in double blue, in double alpha);
+        [StrictTypeChecking] void         clearDepth(in double depth);
+        [StrictTypeChecking] void         clearStencil(in long s);
+        [StrictTypeChecking] void         colorMask(in boolean red, in boolean green, in boolean blue, in boolean alpha);
+        [StrictTypeChecking] void         compileShader(in WebGLShader shader) raises(DOMException);
         
         //void         compressedTexImage2D(in unsigned long target, in long level, in unsigned long internalformat, in unsigned long width, in unsigned long height, in long border, in unsigned long imageSize, const void* data);
         //void         compressedTexSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset, in unsigned long width, in unsigned long height, in unsigned long format, in unsigned long imageSize, const void* data);
         
-        void         copyTexImage2D(in unsigned long target, in long level, in unsigned long internalformat, in long x, in long y, in unsigned long width, in unsigned long height, in long border);
-        void         copyTexSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset, in long x, in long y, in unsigned long width, in unsigned long height);
-
-        WebGLBuffer createBuffer();
-        WebGLFramebuffer createFramebuffer();
-        WebGLProgram createProgram();
-        WebGLRenderbuffer createRenderbuffer();
-        WebGLShader createShader(in unsigned long type) raises(DOMException);
-        WebGLTexture createTexture();
-
-        void         cullFace(in unsigned long mode);
-
-        void         deleteBuffer(in WebGLBuffer buffer);
-        void         deleteFramebuffer(in WebGLFramebuffer framebuffer);
-        void         deleteProgram(in WebGLProgram program);
-        void         deleteRenderbuffer(in WebGLRenderbuffer renderbuffer);
-        void         deleteShader(in WebGLShader shader);
-        void         deleteTexture(in WebGLTexture texture);
-
-        void         depthFunc(in unsigned long func);
-        void         depthMask(in boolean flag);
+        [StrictTypeChecking] void         copyTexImage2D(in unsigned long target, in long level, in unsigned long internalformat, in long x, in long y, in unsigned long width, in unsigned long height, in long border);
+        [StrictTypeChecking] void         copyTexSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset, in long x, in long y, in unsigned long width, in unsigned long height);
+
+        [StrictTypeChecking] WebGLBuffer createBuffer();
+        [StrictTypeChecking] WebGLFramebuffer createFramebuffer();
+        [StrictTypeChecking] WebGLProgram createProgram();
+        [StrictTypeChecking] WebGLRenderbuffer createRenderbuffer();
+        [StrictTypeChecking] WebGLShader createShader(in unsigned long type) raises(DOMException);
+        [StrictTypeChecking] WebGLTexture createTexture();
+
+        [StrictTypeChecking] void         cullFace(in unsigned long mode);
+
+        [StrictTypeChecking] void         deleteBuffer(in WebGLBuffer buffer);
+        [StrictTypeChecking] void         deleteFramebuffer(in WebGLFramebuffer framebuffer);
+        [StrictTypeChecking] void         deleteProgram(in WebGLProgram program);
+        [StrictTypeChecking] void         deleteRenderbuffer(in WebGLRenderbuffer renderbuffer);
+        [StrictTypeChecking] void         deleteShader(in WebGLShader shader);
+        [StrictTypeChecking] void         deleteTexture(in WebGLTexture texture);
+
+        [StrictTypeChecking] void         depthFunc(in unsigned long func);
+        [StrictTypeChecking] void         depthMask(in boolean flag);
         // FIXME: this differs from the current WebGL spec (depthRangef)
-        void         depthRange(in double zNear, in double zFar);
-        void         detachShader(in WebGLProgram program, in WebGLShader shader) raises(DOMException);
-        void         disable(in unsigned long cap);
-        void         disableVertexAttribArray(in unsigned long index) raises(DOMException);
-        void         drawArrays(in unsigned long mode, in long first, in long count) raises(DOMException);
-        void         drawElements(in unsigned long mode, in long count, in unsigned long type, in long offset) raises(DOMException);
-
-        void         enable(in unsigned long cap);
-        void         enableVertexAttribArray(in unsigned long index) raises(DOMException);
-        void         finish();
-        void         flush();
-        void         framebufferRenderbuffer(in unsigned long target, in unsigned long attachment, in unsigned long renderbuffertarget, in WebGLRenderbuffer renderbuffer) raises(DOMException);
-        void         framebufferTexture2D(in unsigned long target, in unsigned long attachment, in unsigned long textarget, in WebGLTexture texture, in long level) raises(DOMException);
-        void         frontFace(in unsigned long mode);
-        void         generateMipmap(in unsigned long target);
+        [StrictTypeChecking] void         depthRange(in double zNear, in double zFar);
+        [StrictTypeChecking] void         detachShader(in WebGLProgram program, in WebGLShader shader) raises(DOMException);
+        [StrictTypeChecking] void         disable(in unsigned long cap);
+        [StrictTypeChecking] void         disableVertexAttribArray(in unsigned long index) raises(DOMException);
+        [StrictTypeChecking] void         drawArrays(in unsigned long mode, in long first, in long count) raises(DOMException);
+        [StrictTypeChecking] void         drawElements(in unsigned long mode, in long count, in unsigned long type, in long offset) raises(DOMException);
+
+        [StrictTypeChecking] void         enable(in unsigned long cap);
+        [StrictTypeChecking] void         enableVertexAttribArray(in unsigned long index) raises(DOMException);
+        [StrictTypeChecking] void         finish();
+        [StrictTypeChecking] void         flush();
+        [StrictTypeChecking] void         framebufferRenderbuffer(in unsigned long target, in unsigned long attachment, in unsigned long renderbuffertarget, in WebGLRenderbuffer renderbuffer) raises(DOMException);
+        [StrictTypeChecking] void         framebufferTexture2D(in unsigned long target, in unsigned long attachment, in unsigned long textarget, in WebGLTexture texture, in long level) raises(DOMException);
+        [StrictTypeChecking] void         frontFace(in unsigned long mode);
+        [StrictTypeChecking] void         generateMipmap(in unsigned long target);
         
-        WebGLActiveInfo getActiveAttrib(in WebGLProgram program, in unsigned long index)
-            raises (DOMException);
-        WebGLActiveInfo getActiveUniform(in WebGLProgram program, in unsigned long index)
-            raises (DOMException);
+        [StrictTypeChecking] WebGLActiveInfo getActiveAttrib(in WebGLProgram program, in unsigned long index) raises (DOMException);
+        [StrictTypeChecking] WebGLActiveInfo getActiveUniform(in WebGLProgram program, in unsigned long index) raises (DOMException);
 
-        [Custom] void getAttachedShaders(in WebGLProgram program)
-            raises (DOMException);
+        [StrictTypeChecking, Custom] void getAttachedShaders(in WebGLProgram program) raises (DOMException);
 
-        int          getAttribLocation(in WebGLProgram program, in DOMString name);
+        [StrictTypeChecking] int          getAttribLocation(in WebGLProgram program, in DOMString name);
 
         // any getBufferParameter(in unsigned long target, in unsigned long pname) raises(DOMException);
-        [Custom] void getBufferParameter();
+        [StrictTypeChecking, Custom] void getBufferParameter();
 
-        WebGLContextAttributes getContextAttributes();
+        [StrictTypeChecking] WebGLContextAttributes getContextAttributes();
 
-        unsigned long getError();
+        [StrictTypeChecking] unsigned long getError();
 
         // any getFramebufferAttachmentParameter(in unsigned long target, in unsigned long attachment, in unsigned long pname) raises(DOMException);
-        [Custom] void getFramebufferAttachmentParameter();
+        [StrictTypeChecking, Custom] void getFramebufferAttachmentParameter();
         // any getParameter(in unsigned long pname) raises(DOMException);
-        [Custom] void getParameter();
+        [StrictTypeChecking, Custom] void getParameter();
         // any getProgramParameter(in WebGLProgram program, in unsigned long pname) raises(DOMException);
-        [Custom] void getProgramParameter();
-        DOMString getProgramInfoLog(in WebGLProgram program) raises(DOMException);
+        [StrictTypeChecking, Custom] void getProgramParameter();
+        [StrictTypeChecking] DOMString getProgramInfoLog(in WebGLProgram program) raises(DOMException);
         // any getRenderbufferParameter(in unsigned long target, in unsigned long pname) raises(DOMException);
-        [Custom] void getRenderbufferParameter();
+        [StrictTypeChecking, Custom] void getRenderbufferParameter();
         // any getShaderParameter(in WebGLShader shader, in unsigned long pname) raises(DOMException);
-        [Custom] void getShaderParameter() raises(DOMException);
+        [StrictTypeChecking, Custom] void getShaderParameter() raises(DOMException);
 
-        DOMString    getShaderInfoLog(in WebGLShader shader) raises(DOMException);
+        [StrictTypeChecking] DOMString    getShaderInfoLog(in WebGLShader shader) raises(DOMException);
 
         // TBD
         // void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
 
-        DOMString    getShaderSource(in WebGLShader shader) raises(DOMException);
-        DOMString    getString(in unsigned long name);
+        [StrictTypeChecking] DOMString    getShaderSource(in WebGLShader shader) raises(DOMException);
+        [StrictTypeChecking] DOMString    getString(in unsigned long name);
 
         // any getTexParameter(in unsigned long target, in unsigned long pname) raises(DOMException);
-        [Custom] void getTexParameter();
+        [StrictTypeChecking, Custom] void getTexParameter();
 
         // any getUniform(in WebGLProgram program, in WebGLUniformLocation location) raises(DOMException);
-        [Custom] void getUniform();
+        [StrictTypeChecking, Custom] void getUniform();
 
-        WebGLUniformLocation getUniformLocation(in WebGLProgram program, in DOMString name) raises(DOMException);
+        [StrictTypeChecking] WebGLUniformLocation getUniformLocation(in WebGLProgram program, in DOMString name) raises(DOMException);
 
         // any getVertexAttrib(in unsigned long index, in unsigned long pname) raises(DOMException);
-        [Custom] void getVertexAttrib();
-
-        long getVertexAttribOffset(in unsigned long index, in unsigned long pname);
-
-        void         hint(in unsigned long target, in unsigned long mode);
-        boolean      isBuffer(in WebGLBuffer buffer);
-        boolean      isEnabled(in unsigned long cap);
-        boolean      isFramebuffer(in WebGLFramebuffer framebuffer);
-        boolean      isProgram(in WebGLProgram program);
-        boolean      isRenderbuffer(in WebGLRenderbuffer renderbuffer);
-        boolean      isShader(in WebGLShader shader);
-        boolean      isTexture(in WebGLTexture texture);
-        void         lineWidth(in double width);
-        void         linkProgram(in WebGLProgram program) raises(DOMException);
-        void         pixelStorei(in unsigned long pname, in long param);
-        void         polygonOffset(in double factor, in double units);
-
-        void         readPixels(in long x, in long y, in long width, in long height, in unsigned long format, in unsigned long type, in ArrayBufferView pixels);
+        [StrictTypeChecking, Custom] void getVertexAttrib();
+
+        [StrictTypeChecking] long getVertexAttribOffset(in unsigned long index, in unsigned long pname);
+
+        [StrictTypeChecking] void         hint(in unsigned long target, in unsigned long mode);
+        [StrictTypeChecking] boolean      isBuffer(in WebGLBuffer buffer);
+        [StrictTypeChecking] boolean      isEnabled(in unsigned long cap);
+        [StrictTypeChecking] boolean      isFramebuffer(in WebGLFramebuffer framebuffer);
+        [StrictTypeChecking] boolean      isProgram(in WebGLProgram program);
+        [StrictTypeChecking] boolean      isRenderbuffer(in WebGLRenderbuffer renderbuffer);
+        [StrictTypeChecking] boolean      isShader(in WebGLShader shader);
+        [StrictTypeChecking] boolean      isTexture(in WebGLTexture texture);
+        [StrictTypeChecking] void         lineWidth(in double width);
+        [StrictTypeChecking] void         linkProgram(in WebGLProgram program) raises(DOMException);
+        [StrictTypeChecking] void         pixelStorei(in unsigned long pname, in long param);
+        [StrictTypeChecking] void         polygonOffset(in double factor, in double units);
+
+        [StrictTypeChecking] void         readPixels(in long x, in long y, in long width, in long height, in unsigned long format, in unsigned long type, in ArrayBufferView pixels);
         
-        void         releaseShaderCompiler();
-        void         renderbufferStorage(in unsigned long target, in unsigned long internalformat, in unsigned long width, in unsigned long height);
-        void         sampleCoverage(in double value, in boolean invert);
-        void         scissor(in long x, in long y, in unsigned long width, in unsigned long height);
-        void         shaderSource(in WebGLShader shader, in DOMString string) raises(DOMException);
-        void         stencilFunc(in unsigned long func, in long ref, in unsigned long mask);
-        void         stencilFuncSeparate(in unsigned long face, in unsigned long func, in long ref, in unsigned long mask);
-        void         stencilMask(in unsigned long mask);
-        void         stencilMaskSeparate(in unsigned long face, in unsigned long mask);
-        void         stencilOp(in unsigned long fail, in unsigned long zfail, in unsigned long zpass);
-        void         stencilOpSeparate(in unsigned long face, in unsigned long fail, in unsigned long zfail, in unsigned long zpass);
-
-        void         texParameterf(in unsigned long target, in unsigned long pname, in float param);
-        void         texParameteri(in unsigned long target, in unsigned long pname, in long param);
+        [StrictTypeChecking] void         releaseShaderCompiler();
+        [StrictTypeChecking] void         renderbufferStorage(in unsigned long target, in unsigned long internalformat, in unsigned long width, in unsigned long height);
+        [StrictTypeChecking] void         sampleCoverage(in double value, in boolean invert);
+        [StrictTypeChecking] void         scissor(in long x, in long y, in unsigned long width, in unsigned long height);
+        [StrictTypeChecking] void         shaderSource(in WebGLShader shader, in DOMString string) raises(DOMException);
+        [StrictTypeChecking] void         stencilFunc(in unsigned long func, in long ref, in unsigned long mask);
+        [StrictTypeChecking] void         stencilFuncSeparate(in unsigned long face, in unsigned long func, in long ref, in unsigned long mask);
+        [StrictTypeChecking] void         stencilMask(in unsigned long mask);
+        [StrictTypeChecking] void         stencilMaskSeparate(in unsigned long face, in unsigned long mask);
+        [StrictTypeChecking] void         stencilOp(in unsigned long fail, in unsigned long zfail, in unsigned long zpass);
+        [StrictTypeChecking] void         stencilOpSeparate(in unsigned long face, in unsigned long fail, in unsigned long zfail, in unsigned long zpass);
+
+        [StrictTypeChecking] void         texParameterf(in unsigned long target, in unsigned long pname, in float param);
+        [StrictTypeChecking] void         texParameteri(in unsigned long target, in unsigned long pname, in long param);
 
         // Supported forms:
-        void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat, in long width, in long height, 
-                                in long border, in unsigned long format, in unsigned long type, in ArrayBufferView pixels) raises (DOMException);
-        void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat,
-                                in unsigned long format, in unsigned long type, in ImageData pixels) raises (DOMException);
-        void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat,
-                                in unsigned long format, in unsigned long type, in HTMLImageElement image) raises (DOMException);
-        void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat,
-                                in unsigned long format, in unsigned long type, in HTMLCanvasElement canvas) raises (DOMException);
-        void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat,
-                                in unsigned long format, in unsigned long type, in HTMLVideoElement video) raises (DOMException);
-
-        void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset, 
-                                   in long width, in long height, 
-                                   in unsigned long format, in unsigned long type, in ArrayBufferView pixels) raises (DOMException);
-        void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
-                                   in unsigned long format, in unsigned long type, in ImageData pixels) raises (DOMException);
-        void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
-                                   in unsigned long format, in unsigned long type, in HTMLImageElement image) raises (DOMException);
-        void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
-                                   in unsigned long format, in unsigned long type, in HTMLCanvasElement canvas) raises (DOMException);
-        void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
-                                   in unsigned long format, in unsigned long type, in HTMLVideoElement video) raises (DOMException);
-
-        void uniform1f(in WebGLUniformLocation location, in float x) raises(DOMException);
-        [Custom] void uniform1fv(in WebGLUniformLocation location, in Float32Array v) raises(DOMException);
-        void uniform1i(in WebGLUniformLocation location, in long x) raises(DOMException);
-        [Custom] void uniform1iv(in WebGLUniformLocation location, in Int32Array v) raises(DOMException);
-        void uniform2f(in WebGLUniformLocation location, in float x, in float y) raises(DOMException);
-        [Custom] void uniform2fv(in WebGLUniformLocation location, in Float32Array v) raises(DOMException);
-        void uniform2i(in WebGLUniformLocation location, in long x, in long y) raises(DOMException);
-        [Custom] void uniform2iv(in WebGLUniformLocation location, in Int32Array v) raises(DOMException);
-        void uniform3f(in WebGLUniformLocation location, in float x, in float y, in float z) raises(DOMException);
-        [Custom] void uniform3fv(in WebGLUniformLocation location, in Float32Array v) raises(DOMException);
-        void uniform3i(in WebGLUniformLocation location, in long x, in long y, in long z) raises(DOMException);
-        [Custom] void uniform3iv(in WebGLUniformLocation location, in Int32Array v) raises(DOMException);
-        void uniform4f(in WebGLUniformLocation location, in float x, in float y, in float z, in float w) raises(DOMException);
-        [Custom] void uniform4fv(in WebGLUniformLocation location, in Float32Array v) raises(DOMException);
-        void uniform4i(in WebGLUniformLocation location, in long x, in long y, in long z, in long w) raises(DOMException);
-        [Custom] void uniform4iv(in WebGLUniformLocation location, in Int32Array v) raises(DOMException);
-
-        [Custom] void uniformMatrix2fv(in WebGLUniformLocation location, in boolean transpose, in Float32Array array) raises(DOMException);
-        [Custom] void uniformMatrix3fv(in WebGLUniformLocation location, in boolean transpose, in Float32Array array) raises(DOMException);
-        [Custom] void uniformMatrix4fv(in WebGLUniformLocation location, in boolean transpose, in Float32Array array) raises(DOMException);
-
-        void         useProgram(in WebGLProgram program) raises(DOMException);
-        void         validateProgram(in WebGLProgram program) raises(DOMException);
-
-        void         vertexAttrib1f(in unsigned long indx, in float x);
-        [Custom] void         vertexAttrib1fv(in unsigned long indx, in Float32Array values);
-        void         vertexAttrib2f(in unsigned long indx, in float x, in float y);
-        [Custom] void         vertexAttrib2fv(in unsigned long indx, in Float32Array values);
-        void         vertexAttrib3f(in unsigned long indx, in float x, in float y, in float z);
-        [Custom] void         vertexAttrib3fv(in unsigned long indx, in Float32Array values);
-        void         vertexAttrib4f(in unsigned long indx, in float x, in float y, in float z, in float w);
-        [Custom] void         vertexAttrib4fv(in unsigned long indx, in Float32Array values);
-        void         vertexAttribPointer(in unsigned long indx, in long size, in unsigned long type, in boolean normalized, 
-                                         in long stride, in unsigned long offset) raises(DOMException);
-
-        void         viewport(in long x, in long y, in unsigned long width, in unsigned long height);
+        [StrictTypeChecking] void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat, in long width, in long height, 
+                                                     in long border, in unsigned long format, in unsigned long type, in ArrayBufferView pixels) raises (DOMException);
+        [StrictTypeChecking] void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat,
+                                                     in unsigned long format, in unsigned long type, in ImageData pixels) raises (DOMException);
+        [StrictTypeChecking] void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat,
+                                                     in unsigned long format, in unsigned long type, in HTMLImageElement image) raises (DOMException);
+        [StrictTypeChecking] void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat,
+                                                     in unsigned long format, in unsigned long type, in HTMLCanvasElement canvas) raises (DOMException);
+        [StrictTypeChecking] void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat,
+                                                     in unsigned long format, in unsigned long type, in HTMLVideoElement video) raises (DOMException);
+
+        [StrictTypeChecking] void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset, 
+                                                        in long width, in long height, 
+                                                        in unsigned long format, in unsigned long type, in ArrayBufferView pixels) raises (DOMException);
+        [StrictTypeChecking] void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
+                                                        in unsigned long format, in unsigned long type, in ImageData pixels) raises (DOMException);
+        [StrictTypeChecking] void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
+                                                        in unsigned long format, in unsigned long type, in HTMLImageElement image) raises (DOMException);
+        [StrictTypeChecking] void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
+                                                        in unsigned long format, in unsigned long type, in HTMLCanvasElement canvas) raises (DOMException);
+        [StrictTypeChecking] void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
+                                                        in unsigned long format, in unsigned long type, in HTMLVideoElement video) raises (DOMException);
+
+        [StrictTypeChecking] void uniform1f(in WebGLUniformLocation location, in float x) raises(DOMException);
+        [StrictTypeChecking, Custom] void uniform1fv(in WebGLUniformLocation location, in Float32Array v) raises(DOMException);
+        [StrictTypeChecking] void uniform1i(in WebGLUniformLocation location, in long x) raises(DOMException);
+        [StrictTypeChecking, Custom] void uniform1iv(in WebGLUniformLocation location, in Int32Array v) raises(DOMException);
+        [StrictTypeChecking] void uniform2f(in WebGLUniformLocation location, in float x, in float y) raises(DOMException);
+        [StrictTypeChecking, Custom] void uniform2fv(in WebGLUniformLocation location, in Float32Array v) raises(DOMException);
+        [StrictTypeChecking] void uniform2i(in WebGLUniformLocation location, in long x, in long y) raises(DOMException);
+        [StrictTypeChecking, Custom] void uniform2iv(in WebGLUniformLocation location, in Int32Array v) raises(DOMException);
+        [StrictTypeChecking] void uniform3f(in WebGLUniformLocation location, in float x, in float y, in float z) raises(DOMException);
+        [StrictTypeChecking, Custom] void uniform3fv(in WebGLUniformLocation location, in Float32Array v) raises(DOMException);
+        [StrictTypeChecking] void uniform3i(in WebGLUniformLocation location, in long x, in long y, in long z) raises(DOMException);
+        [StrictTypeChecking, Custom] void uniform3iv(in WebGLUniformLocation location, in Int32Array v) raises(DOMException);
+        [StrictTypeChecking] void uniform4f(in WebGLUniformLocation location, in float x, in float y, in float z, in float w) raises(DOMException);
+        [StrictTypeChecking, Custom] void uniform4fv(in WebGLUniformLocation location, in Float32Array v) raises(DOMException);
+        [StrictTypeChecking] void uniform4i(in WebGLUniformLocation location, in long x, in long y, in long z, in long w) raises(DOMException);
+        [StrictTypeChecking, Custom] void uniform4iv(in WebGLUniformLocation location, in Int32Array v) raises(DOMException);
+
+        [StrictTypeChecking, Custom] void uniformMatrix2fv(in WebGLUniformLocation location, in boolean transpose, in Float32Array array) raises(DOMException);
+        [StrictTypeChecking, Custom] void uniformMatrix3fv(in WebGLUniformLocation location, in boolean transpose, in Float32Array array) raises(DOMException);
+        [StrictTypeChecking, Custom] void uniformMatrix4fv(in WebGLUniformLocation location, in boolean transpose, in Float32Array array) raises(DOMException);
+
+        [StrictTypeChecking] void         useProgram(in WebGLProgram program) raises(DOMException);
+        [StrictTypeChecking] void         validateProgram(in WebGLProgram program) raises(DOMException);
+
+        [StrictTypeChecking] void         vertexAttrib1f(in unsigned long indx, in float x);
+        [StrictTypeChecking, Custom] void         vertexAttrib1fv(in unsigned long indx, in Float32Array values);
+        [StrictTypeChecking] void         vertexAttrib2f(in unsigned long indx, in float x, in float y);
+        [StrictTypeChecking, Custom] void         vertexAttrib2fv(in unsigned long indx, in Float32Array values);
+        [StrictTypeChecking] void         vertexAttrib3f(in unsigned long indx, in float x, in float y, in float z);
+        [StrictTypeChecking, Custom] void         vertexAttrib3fv(in unsigned long indx, in Float32Array values);
+        [StrictTypeChecking] void         vertexAttrib4f(in unsigned long indx, in float x, in float y, in float z, in float w);
+        [StrictTypeChecking, Custom] void         vertexAttrib4fv(in unsigned long indx, in Float32Array values);
+        [StrictTypeChecking] void         vertexAttribPointer(in unsigned long indx, in long size, in unsigned long type, in boolean normalized, 
+                                                              in long stride, in unsigned long offset) raises(DOMException);
+
+        [StrictTypeChecking] void         viewport(in long x, in long y, in unsigned long width, in unsigned long height);
     };
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list