Commit 1825ebee authored by bajones@chromium.org's avatar bajones@chromium.org

Got WebGLRenderingContextBase to work with the "implements" syntax

BUG=348033
R=arv@chromium.org, ch.dumez@samsung.com

Review URL: https://codereview.chromium.org/205243013

git-svn-id: svn://svn.chromium.org/blink/trunk@170000 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent bf461607
......@@ -5,58 +5,58 @@ 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: Failed to execute 'compileShader' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLShader'..
PASS context.linkProgram(argument) threw exception TypeError: Failed to execute 'linkProgram' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.attachShader(program, argument) threw exception TypeError: Failed to execute 'attachShader' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLShader'..
PASS context.attachShader(argument, shader) threw exception TypeError: Failed to execute 'attachShader' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.detachShader(program, argument) threw exception TypeError: Failed to execute 'detachShader' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLShader'..
PASS context.detachShader(argument, shader) threw exception TypeError: Failed to execute 'detachShader' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.useProgram(argument) threw exception TypeError: Failed to execute 'useProgram' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.shaderSource(argument, 'foo') threw exception TypeError: Failed to execute 'shaderSource' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLShader'..
PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Failed to execute 'bindAttribLocation' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Failed to execute 'bindBuffer' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLBuffer'..
PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Failed to execute 'bindFramebuffer' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLFramebuffer'..
PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Failed to execute 'bindRenderbuffer' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLRenderbuffer'..
PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Failed to execute 'bindTexture' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLTexture'..
PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) threw exception TypeError: Failed to execute 'framebufferRenderbuffer' on 'WebGLRenderingContextBase': parameter 4 is not of type 'WebGLRenderbuffer'..
PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) threw exception TypeError: Failed to execute 'framebufferTexture2D' on 'WebGLRenderingContextBase': parameter 4 is not of type 'WebGLTexture'..
PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) threw exception TypeError: Failed to execute 'uniform2fv' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.uniform2iv(argument, new Int32Array([0, 0])) threw exception TypeError: Failed to execute 'uniform2iv' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0])) threw exception TypeError: Failed to execute 'uniformMatrix2fv' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.getProgramParameter(argument, 0) threw exception TypeError: Failed to execute 'getProgramParameter' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLProgram object..
PASS context.getShaderParameter(argument, 0) threw exception TypeError: Failed to execute 'getShaderParameter' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLShader object..
PASS context.getUniform(argument, loc) threw exception TypeError: Failed to execute 'getUniform' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLProgram object..
PASS context.getUniform(program, argument) threw exception TypeError: Failed to execute 'getUniform' on 'WebGLRenderingContextBase': The 2nd argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Failed to execute 'getUniformLocation' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.getProgramInfoLog(argument) threw exception TypeError: Failed to execute 'getProgramInfoLog' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.getShaderInfoLog(argument) threw exception TypeError: Failed to execute 'getShaderInfoLog' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLShader'..
PASS context.getShaderSource(argument) threw exception TypeError: Failed to execute 'getShaderSource' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLShader'..
PASS context.compileShader(argument) threw exception TypeError: Failed to execute 'compileShader' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLShader'..
PASS context.linkProgram(argument) threw exception TypeError: Failed to execute 'linkProgram' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.attachShader(program, argument) threw exception TypeError: Failed to execute 'attachShader' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLShader'..
PASS context.attachShader(argument, shader) threw exception TypeError: Failed to execute 'attachShader' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.detachShader(program, argument) threw exception TypeError: Failed to execute 'detachShader' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLShader'..
PASS context.detachShader(argument, shader) threw exception TypeError: Failed to execute 'detachShader' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.useProgram(argument) threw exception TypeError: Failed to execute 'useProgram' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.shaderSource(argument, 'foo') threw exception TypeError: Failed to execute 'shaderSource' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLShader'..
PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Failed to execute 'bindAttribLocation' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Failed to execute 'bindBuffer' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLBuffer'..
PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Failed to execute 'bindFramebuffer' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLFramebuffer'..
PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Failed to execute 'bindRenderbuffer' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLRenderbuffer'..
PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Failed to execute 'bindTexture' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLTexture'..
PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) threw exception TypeError: Failed to execute 'framebufferRenderbuffer' on 'WebGLRenderingContextBase': parameter 4 is not of type 'WebGLRenderbuffer'..
PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) threw exception TypeError: Failed to execute 'framebufferTexture2D' on 'WebGLRenderingContextBase': parameter 4 is not of type 'WebGLTexture'..
PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) threw exception TypeError: Failed to execute 'uniform2fv' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.uniform2iv(argument, new Int32Array([0, 0])) threw exception TypeError: Failed to execute 'uniform2iv' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0])) threw exception TypeError: Failed to execute 'uniformMatrix2fv' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.getProgramParameter(argument, 0) threw exception TypeError: Failed to execute 'getProgramParameter' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLProgram object..
PASS context.getShaderParameter(argument, 0) threw exception TypeError: Failed to execute 'getShaderParameter' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLShader object..
PASS context.getUniform(argument, loc) threw exception TypeError: Failed to execute 'getUniform' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLProgram object..
PASS context.getUniform(program, argument) threw exception TypeError: Failed to execute 'getUniform' on 'WebGLRenderingContextBase': The 2nd argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Failed to execute 'getUniformLocation' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.getProgramInfoLog(argument) threw exception TypeError: Failed to execute 'getProgramInfoLog' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLProgram'..
PASS context.getShaderInfoLog(argument) threw exception TypeError: Failed to execute 'getShaderInfoLog' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLShader'..
PASS context.getShaderSource(argument) threw exception TypeError: Failed to execute 'getShaderSource' on 'WebGLRenderingContextBase': parameter 1 is not of type 'WebGLShader'..
PASS context.compileShader(argument) threw exception TypeError: Failed to execute 'compileShader' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'..
PASS context.linkProgram(argument) threw exception TypeError: Failed to execute 'linkProgram' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.attachShader(program, argument) threw exception TypeError: Failed to execute 'attachShader' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLShader'..
PASS context.attachShader(argument, shader) threw exception TypeError: Failed to execute 'attachShader' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.detachShader(program, argument) threw exception TypeError: Failed to execute 'detachShader' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLShader'..
PASS context.detachShader(argument, shader) threw exception TypeError: Failed to execute 'detachShader' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.useProgram(argument) threw exception TypeError: Failed to execute 'useProgram' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.shaderSource(argument, 'foo') threw exception TypeError: Failed to execute 'shaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'..
PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Failed to execute 'bindAttribLocation' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Failed to execute 'bindBuffer' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLBuffer'..
PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Failed to execute 'bindFramebuffer' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLFramebuffer'..
PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Failed to execute 'bindRenderbuffer' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLRenderbuffer'..
PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Failed to execute 'bindTexture' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLTexture'..
PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) threw exception TypeError: Failed to execute 'framebufferRenderbuffer' on 'WebGLRenderingContext': parameter 4 is not of type 'WebGLRenderbuffer'..
PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) threw exception TypeError: Failed to execute 'framebufferTexture2D' on 'WebGLRenderingContext': parameter 4 is not of type 'WebGLTexture'..
PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) threw exception TypeError: Failed to execute 'uniform2fv' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.uniform2iv(argument, new Int32Array([0, 0])) threw exception TypeError: Failed to execute 'uniform2iv' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0])) threw exception TypeError: Failed to execute 'uniformMatrix2fv' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.getProgramParameter(argument, 0) threw exception TypeError: Failed to execute 'getProgramParameter' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLProgram object..
PASS context.getShaderParameter(argument, 0) threw exception TypeError: Failed to execute 'getShaderParameter' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLShader object..
PASS context.getUniform(argument, loc) threw exception TypeError: Failed to execute 'getUniform' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLProgram object..
PASS context.getUniform(program, argument) threw exception TypeError: Failed to execute 'getUniform' on 'WebGLRenderingContext': The 2nd argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Failed to execute 'getUniformLocation' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.getProgramInfoLog(argument) threw exception TypeError: Failed to execute 'getProgramInfoLog' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.getShaderInfoLog(argument) threw exception TypeError: Failed to execute 'getShaderInfoLog' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'..
PASS context.getShaderSource(argument) threw exception TypeError: Failed to execute 'getShaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'..
PASS context.compileShader(argument) threw exception TypeError: Failed to execute 'compileShader' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'..
PASS context.linkProgram(argument) threw exception TypeError: Failed to execute 'linkProgram' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.attachShader(program, argument) threw exception TypeError: Failed to execute 'attachShader' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLShader'..
PASS context.attachShader(argument, shader) threw exception TypeError: Failed to execute 'attachShader' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.detachShader(program, argument) threw exception TypeError: Failed to execute 'detachShader' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLShader'..
PASS context.detachShader(argument, shader) threw exception TypeError: Failed to execute 'detachShader' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.useProgram(argument) threw exception TypeError: Failed to execute 'useProgram' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.shaderSource(argument, 'foo') threw exception TypeError: Failed to execute 'shaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'..
PASS context.bindAttribLocation(argument, 0, 'foo') threw exception TypeError: Failed to execute 'bindAttribLocation' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.bindBuffer(context.ARRAY_BUFFER, argument) threw exception TypeError: Failed to execute 'bindBuffer' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLBuffer'..
PASS context.bindFramebuffer(context.FRAMEBUFFER, argument) threw exception TypeError: Failed to execute 'bindFramebuffer' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLFramebuffer'..
PASS context.bindRenderbuffer(context.RENDERBUFFER, argument) threw exception TypeError: Failed to execute 'bindRenderbuffer' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLRenderbuffer'..
PASS context.bindTexture(context.TEXTURE_2D, argument) threw exception TypeError: Failed to execute 'bindTexture' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLTexture'..
PASS context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument) threw exception TypeError: Failed to execute 'framebufferRenderbuffer' on 'WebGLRenderingContext': parameter 4 is not of type 'WebGLRenderbuffer'..
PASS context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0) threw exception TypeError: Failed to execute 'framebufferTexture2D' on 'WebGLRenderingContext': parameter 4 is not of type 'WebGLTexture'..
PASS context.uniform2fv(argument, new Float32Array([0.0, 0.0])) threw exception TypeError: Failed to execute 'uniform2fv' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.uniform2iv(argument, new Int32Array([0, 0])) threw exception TypeError: Failed to execute 'uniform2iv' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0])) threw exception TypeError: Failed to execute 'uniformMatrix2fv' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.getProgramParameter(argument, 0) threw exception TypeError: Failed to execute 'getProgramParameter' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLProgram object..
PASS context.getShaderParameter(argument, 0) threw exception TypeError: Failed to execute 'getShaderParameter' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLShader object..
PASS context.getUniform(argument, loc) threw exception TypeError: Failed to execute 'getUniform' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLProgram object..
PASS context.getUniform(program, argument) threw exception TypeError: Failed to execute 'getUniform' on 'WebGLRenderingContext': The 2nd argument provided is either null, or an invalid WebGLUniformLocation object..
PASS context.getUniformLocation(argument, 'u_modelViewProjMatrix') threw exception TypeError: Failed to execute 'getUniformLocation' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.getProgramInfoLog(argument) threw exception TypeError: Failed to execute 'getProgramInfoLog' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLProgram'..
PASS context.getShaderInfoLog(argument) threw exception TypeError: Failed to execute 'getShaderInfoLog' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'..
PASS context.getShaderSource(argument) threw exception TypeError: Failed to execute 'getShaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'..
PASS context.compileShader(argument) is undefined.
PASS context.linkProgram(argument) is undefined.
PASS context.attachShader(program, argument) is undefined.
......
......@@ -7,7 +7,7 @@ PASS shaders[0] == standardVert && shaders[1] == standardFrag || shaders[1] == s
PASS getError was expected value: NO_ERROR :
PASS gl.getAttachedShaders(null) is null
PASS getError was expected value: INVALID_VALUE :
PASS gl.getAttachedShaders(standardVert) threw exception TypeError: Failed to execute 'getAttachedShaders' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLProgram object..
PASS gl.getAttachedShaders(standardVert) threw exception TypeError: Failed to execute 'getAttachedShaders' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLProgram object..
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
......
......@@ -14,10 +14,10 @@ PASS context.detachShader(undefined, shader) was expected value: INVALID_VALUE.
PASS context.shaderSource(undefined, undefined) 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) threw exception TypeError: Failed to execute 'bindBuffer' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLBuffer'..
PASS context.bindFramebuffer(context.FRAMEBUFFER, 0) threw exception TypeError: Failed to execute 'bindFramebuffer' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLFramebuffer'..
PASS context.bindRenderbuffer(context.RENDERBUFFER, 0) threw exception TypeError: Failed to execute 'bindRenderbuffer' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLRenderbuffer'..
PASS context.bindTexture(context.TEXTURE_2D, 0) threw exception TypeError: Failed to execute 'bindTexture' on 'WebGLRenderingContextBase': parameter 2 is not of type 'WebGLTexture'..
PASS context.bindBuffer(context.ARRAY_BUFFER, 0) threw exception TypeError: Failed to execute 'bindBuffer' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLBuffer'..
PASS context.bindFramebuffer(context.FRAMEBUFFER, 0) threw exception TypeError: Failed to execute 'bindFramebuffer' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLFramebuffer'..
PASS context.bindRenderbuffer(context.RENDERBUFFER, 0) threw exception TypeError: Failed to execute 'bindRenderbuffer' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLRenderbuffer'..
PASS context.bindTexture(context.TEXTURE_2D, 0) threw exception TypeError: Failed to execute 'bindTexture' on 'WebGLRenderingContext': parameter 2 is not of type 'WebGLTexture'..
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.
......
......@@ -2,9 +2,9 @@ Test of texImage2d and texSubImage2d
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS context.texImage2D(context.TEXTURE_2D) threw exception TypeError: Failed to execute 'texImage2D' on 'WebGLRenderingContextBase': 6 arguments required, but only 1 present..
PASS context.texImage2D(context.TEXTURE_2D) threw exception TypeError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': 6 arguments required, but only 1 present..
PASS context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, 64, 64, 0, context.RGBA, context.UNSIGNED_BYTE, null) is undefined.
PASS context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, 0, context.RGBA, context.UNSIGNED_BYTE, 0) threw exception TypeError: Failed to execute 'texImage2D' on 'WebGLRenderingContextBase': No function was found that matched the signature provided..
PASS context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, 0, context.RGBA, context.UNSIGNED_BYTE, 0) threw exception TypeError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided..
PASS context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, 2, 2, 0, context.RGBA, context.UNSIGNED_BYTE, array) is undefined.
PASS context.pixelStorei(context.UNPACK_FLIP_Y_WEBGL, true) is undefined.
PASS context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, context.RGBA, context.UNSIGNED_BYTE, imageData) is undefined.
......@@ -13,10 +13,10 @@ PASS context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, context.RGBA, conte
PASS context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, context.RGBA, context.UNSIGNED_BYTE, canvas2d) is undefined.
PASS context.pixelStorei(context.UNPACK_FLIP_Y_WEBGL, true) is undefined.
PASS context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, context.RGBA, context.UNSIGNED_BYTE, video) is undefined.
PASS context.texSubImage2D(context.TEXTURE_2D) threw exception TypeError: Failed to execute 'texSubImage2D' on 'WebGLRenderingContextBase': 7 arguments required, but only 1 present..
PASS context.texSubImage2D(context.TEXTURE_2D) threw exception TypeError: Failed to execute 'texSubImage2D' on 'WebGLRenderingContext': 7 arguments required, but only 1 present..
PASS context.texSubImage2D(context.TEXTURE_2D, 0, 10, 20, 0, 0, context.RGBA, context.UNSIGNED_BYTE, null) is undefined.
PASS context.texSubImage2D(context.TEXTURE_2D, 0, 10, 20, 0, 0, context.RGBA, context.UNSIGNED_BYTE, 0) threw exception TypeError: Failed to execute 'texSubImage2D' on 'WebGLRenderingContextBase': No function was found that matched the signature provided..
PASS context.texSubImage2D(context.TEXTURE_2D, 0, 10, 20, 0, context.UNSIGNED_BYTE, 0) threw exception TypeError: Failed to execute 'texSubImage2D' on 'WebGLRenderingContextBase': No function was found that matched the signature provided..
PASS context.texSubImage2D(context.TEXTURE_2D, 0, 10, 20, 0, 0, context.RGBA, context.UNSIGNED_BYTE, 0) threw exception TypeError: Failed to execute 'texSubImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided..
PASS context.texSubImage2D(context.TEXTURE_2D, 0, 10, 20, 0, context.UNSIGNED_BYTE, 0) threw exception TypeError: Failed to execute 'texSubImage2D' on 'WebGLRenderingContext': No function was found that matched the signature provided..
PASS context.pixelStorei(context.UNPACK_FLIP_Y_WEBGL, false) is undefined.
PASS context.texSubImage2D(context.TEXTURE_2D, 0, 10, 20, context.RGBA, context.UNSIGNED_BYTE, imageData) is undefined.
PASS context.texSubImage2D(context.TEXTURE_2D, 0, 10, 20, context.RGBA, context.UNSIGNED_BYTE, image) is undefined.
......
PASS gl.getBufferParameter() threw exception TypeError: Failed to execute 'getBufferParameter' on 'WebGLRenderingContextBase': 2 arguments required, but only 0 present..
PASS gl.getRenderbufferParameter() threw exception TypeError: Failed to execute 'getRenderbufferParameter' on 'WebGLRenderingContextBase': 2 arguments required, but only 0 present..
PASS gl.getTexParameter() threw exception TypeError: Failed to execute 'getTexParameter' on 'WebGLRenderingContextBase': 2 arguments required, but only 0 present..
PASS gl.getVertexAttrib() threw exception TypeError: Failed to execute 'getVertexAttrib' on 'WebGLRenderingContextBase': 2 arguments required, but only 0 present..
PASS gl.getAttachedShaders() threw exception TypeError: Failed to execute 'getAttachedShaders' on 'WebGLRenderingContextBase': 1 argument required, but only 0 present..
PASS gl.getExtension() threw exception TypeError: Failed to execute 'getExtension' on 'WebGLRenderingContextBase': 1 argument required, but only 0 present..
PASS gl.getFramebufferAttachmentParameter() threw exception TypeError: Failed to execute 'getFramebufferAttachmentParameter' on 'WebGLRenderingContextBase': 3 arguments required, but only 0 present..
PASS gl.getParameter() threw exception TypeError: Failed to execute 'getParameter' on 'WebGLRenderingContextBase': 1 argument required, but only 0 present..
PASS gl.getProgramParameter() threw exception TypeError: Failed to execute 'getProgramParameter' on 'WebGLRenderingContextBase': 2 arguments required, but only 0 present..
PASS gl.getShaderParameter() threw exception TypeError: Failed to execute 'getShaderParameter' on 'WebGLRenderingContextBase': 2 arguments required, but only 0 present..
PASS gl.getUniform() threw exception TypeError: Failed to execute 'getUniform' on 'WebGLRenderingContextBase': 2 arguments required, but only 0 present..
PASS gl.uniform1iv() threw exception TypeError: Failed to execute 'uniform1iv' on 'WebGLRenderingContextBase': 2 arguments required, but only 0 present..
PASS gl.uniformMatrix2fv() threw exception TypeError: Failed to execute 'uniformMatrix2fv' on 'WebGLRenderingContextBase': 3 arguments required, but only 0 present..
PASS gl.uniform1fv() threw exception TypeError: Failed to execute 'uniform1fv' on 'WebGLRenderingContextBase': 2 arguments required, but only 0 present..
PASS gl.vertexAttrib1fv() threw exception TypeError: Failed to execute 'vertexAttrib1fv' on 'WebGLRenderingContextBase': 2 arguments required, but only 0 present..
PASS gl.uniformMatrix4fv(1, 1) threw exception TypeError: Failed to execute 'uniformMatrix4fv' on 'WebGLRenderingContextBase': 3 arguments required, but only 2 present..
PASS gl.getBufferParameter() threw exception TypeError: Failed to execute 'getBufferParameter' on 'WebGLRenderingContext': 2 arguments required, but only 0 present..
PASS gl.getRenderbufferParameter() threw exception TypeError: Failed to execute 'getRenderbufferParameter' on 'WebGLRenderingContext': 2 arguments required, but only 0 present..
PASS gl.getTexParameter() threw exception TypeError: Failed to execute 'getTexParameter' on 'WebGLRenderingContext': 2 arguments required, but only 0 present..
PASS gl.getVertexAttrib() threw exception TypeError: Failed to execute 'getVertexAttrib' on 'WebGLRenderingContext': 2 arguments required, but only 0 present..
PASS gl.getAttachedShaders() threw exception TypeError: Failed to execute 'getAttachedShaders' on 'WebGLRenderingContext': 1 argument required, but only 0 present..
PASS gl.getExtension() threw exception TypeError: Failed to execute 'getExtension' on 'WebGLRenderingContext': 1 argument required, but only 0 present..
PASS gl.getFramebufferAttachmentParameter() threw exception TypeError: Failed to execute 'getFramebufferAttachmentParameter' on 'WebGLRenderingContext': 3 arguments required, but only 0 present..
PASS gl.getParameter() threw exception TypeError: Failed to execute 'getParameter' on 'WebGLRenderingContext': 1 argument required, but only 0 present..
PASS gl.getProgramParameter() threw exception TypeError: Failed to execute 'getProgramParameter' on 'WebGLRenderingContext': 2 arguments required, but only 0 present..
PASS gl.getShaderParameter() threw exception TypeError: Failed to execute 'getShaderParameter' on 'WebGLRenderingContext': 2 arguments required, but only 0 present..
PASS gl.getUniform() threw exception TypeError: Failed to execute 'getUniform' on 'WebGLRenderingContext': 2 arguments required, but only 0 present..
PASS gl.uniform1iv() threw exception TypeError: Failed to execute 'uniform1iv' on 'WebGLRenderingContext': 2 arguments required, but only 0 present..
PASS gl.uniformMatrix2fv() threw exception TypeError: Failed to execute 'uniformMatrix2fv' on 'WebGLRenderingContext': 3 arguments required, but only 0 present..
PASS gl.uniform1fv() threw exception TypeError: Failed to execute 'uniform1fv' on 'WebGLRenderingContext': 2 arguments required, but only 0 present..
PASS gl.vertexAttrib1fv() threw exception TypeError: Failed to execute 'vertexAttrib1fv' on 'WebGLRenderingContext': 2 arguments required, but only 0 present..
PASS gl.uniformMatrix4fv(1, 1) threw exception TypeError: Failed to execute 'uniformMatrix4fv' on 'WebGLRenderingContext': 3 arguments required, but only 2 present..
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -5,10 +5,10 @@ PASS: Calling readPixels() from an untainted canvas was allowed.
PASS: Calling toDataURL() on an untainted canvas was allowed.
Tainted canvas:
PASS: Calling texImage2D() with a tainted image was not allowed: Threw error: SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContextBase': The cross-origin image at http://localhost:8000/security/resources/abe-allow-star.php may not be loaded..
PASS: Calling texImage2D() with a tainted image was not allowed: Threw error: SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at http://localhost:8000/security/resources/abe-allow-star.php may not be loaded..
PASS: Calling readPixels() on a canvas where tainting was attempted by a remote image was allowed.
PASS: Calling toDataURL() on a canvas where tainting was attempted by a remote image was allowed.
PASS: Calling texImage2D() with a tainted canvas was not allowed: Threw error: SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContextBase': Tainted canvases may not be loaded..
PASS: Calling texImage2D() with a tainted canvas was not allowed: Threw error: SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': Tainted canvases may not be loaded..
PASS: Calling readPixels() on a canvas where tainting was attempted by a tainted canvas was allowed.
PASS: Calling toDataURL() on a canvas where tainting was attempted by a tainted canvas was allowed.
......@@ -18,10 +18,10 @@ PASS: Calling readPixels() from an untainted canvas was allowed.
PASS: Calling toDataURL() on an untainted canvas was allowed.
Tainted canvas:
PASS: Calling texImage2D() with a tainted video was not allowed: Threw error: SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContextBase': The video element contains cross-origin data, and may not be loaded..
PASS: Calling texImage2D() with a tainted video was not allowed: Threw error: SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The video element contains cross-origin data, and may not be loaded..
PASS: Calling readPixels() on a canvas where tainting was attempted by a remote video was allowed.
PASS: Calling toDataURL() on a canvas where tainting was attempted by a remote video was allowed.
PASS: Calling texImage2D() with a tainted canvas was not allowed: Threw error: SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContextBase': Tainted canvases may not be loaded..
PASS: Calling texImage2D() with a tainted canvas was not allowed: Threw error: SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': Tainted canvases may not be loaded..
PASS: Calling readPixels() on a canvas where tainting was attempted by a tainted canvas was allowed.
PASS: Calling toDataURL() on a canvas where tainting was attempted by a tainted canvas was allowed.
DONE
......
......@@ -7,7 +7,7 @@ PASS shaders[0] == standardVert && shaders[1] == standardFrag || shaders[1] == s
PASS getError was expected value: NO_ERROR :
PASS gl.getAttachedShaders(null) is null
PASS getError was expected value: INVALID_VALUE :
PASS gl.getAttachedShaders(standardVert) threw exception TypeError: Failed to execute 'getAttachedShaders' on 'WebGLRenderingContextBase': The 1st argument provided is either null, or an invalid WebGLProgram object..
PASS gl.getAttachedShaders(standardVert) threw exception TypeError: Failed to execute 'getAttachedShaders' on 'WebGLRenderingContext': The 1st argument provided is either null, or an invalid WebGLProgram object..
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
......
......@@ -228,7 +228,7 @@
'v8/custom/V8Uint32ArrayCustom.h',
'v8/custom/V8Uint8ArrayCustom.h',
'v8/custom/V8Uint8ClampedArrayCustom.h',
'v8/custom/V8WebGLRenderingContextBaseCustom.cpp',
'v8/custom/V8WebGLRenderingContextCustom.cpp',
'v8/custom/V8WebKitPointCustom.cpp',
'v8/custom/V8WindowCustom.cpp',
'v8/custom/V8WorkerGlobalScopeCustom.cpp',
......
......@@ -29,7 +29,7 @@
*/
#include "config.h"
#include "V8WebGLRenderingContextBase.h"
#include "V8WebGLRenderingContext.h"
#include "V8ANGLEInstancedArrays.h"
#include "V8EXTFragDepth.h"
......@@ -73,7 +73,7 @@
#include "bindings/v8/custom/V8Uint32ArrayCustom.h"
#include "bindings/v8/custom/V8Uint8ArrayCustom.h"
#include "core/dom/ExceptionCode.h"
#include "core/html/canvas/WebGLRenderingContextBase.h"
#include "core/html/canvas/WebGLRenderingContext.h"
#include "platform/NotImplemented.h"
#include "wtf/FastMalloc.h"
#include <limits>
......@@ -276,7 +276,7 @@ static void getObjectParameter(const v8::FunctionCallbackInfo<v8::Value>& info,
return;
}
WebGLRenderingContextBase* context = V8WebGLRenderingContextBase::toNative(info.Holder());
WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(info.Holder());
unsigned target = toInt32(info[0], exceptionState);
if (exceptionState.throwIfNeeded())
return;
......@@ -314,9 +314,9 @@ enum WhichProgramCall {
kProgramParameter, kUniform
};
void V8WebGLRenderingContextBase::getAttachedShadersMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::getAttachedShadersMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getAttachedShaders", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getAttachedShaders", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
if (info.Length() < 1) {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
exceptionState.throwIfNeeded();
......@@ -324,7 +324,7 @@ void V8WebGLRenderingContextBase::getAttachedShadersMethodCustom(const v8::Funct
}
const int programArgumentIndex = 0;
WebGLRenderingContextBase* context = V8WebGLRenderingContextBase::toNative(info.Holder());
WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(info.Holder());
if (info.Length() > 0 && !isUndefinedOrNull(info[programArgumentIndex]) && !V8WebGLProgram::hasInstance(info[programArgumentIndex], info.GetIsolate())) {
exceptionState.throwTypeError(ExceptionMessages::argumentNullOrIncorrectType(programArgumentIndex + 1, "WebGLProgram"));
exceptionState.throwIfNeeded();
......@@ -343,16 +343,16 @@ void V8WebGLRenderingContextBase::getAttachedShadersMethodCustom(const v8::Funct
v8SetReturnValue(info, array);
}
void V8WebGLRenderingContextBase::getBufferParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::getBufferParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getBufferParameter", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getBufferParameter", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
getObjectParameter(info, kBuffer, exceptionState);
}
void V8WebGLRenderingContextBase::getExtensionMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::getExtensionMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getExtension", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
WebGLRenderingContextBase* impl = V8WebGLRenderingContextBase::toNative(info.Holder());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getExtension", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
WebGLRenderingContext* impl = V8WebGLRenderingContext::toNative(info.Holder());
if (info.Length() < 1) {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
exceptionState.throwIfNeeded();
......@@ -363,16 +363,16 @@ void V8WebGLRenderingContextBase::getExtensionMethodCustom(const v8::FunctionCal
v8SetReturnValue(info, toV8Object(extension.get(), info.Holder(), info.GetIsolate()));
}
void V8WebGLRenderingContextBase::getFramebufferAttachmentParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::getFramebufferAttachmentParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getFramebufferAttachmentParameter", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getFramebufferAttachmentParameter", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
if (info.Length() != 3) {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, info.Length()));
exceptionState.throwIfNeeded();
return;
}
WebGLRenderingContextBase* context = V8WebGLRenderingContextBase::toNative(info.Holder());
WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(info.Holder());
unsigned target = toInt32(info[0]);
unsigned attachment = toInt32(info[1], exceptionState);
if (exceptionState.throwIfNeeded())
......@@ -384,16 +384,16 @@ void V8WebGLRenderingContextBase::getFramebufferAttachmentParameterMethodCustom(
v8SetReturnValue(info, toV8Object(args, info.Holder(), info.GetIsolate()));
}
void V8WebGLRenderingContextBase::getParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::getParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getParameter", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getParameter", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
if (info.Length() != 1) {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
exceptionState.throwIfNeeded();
return;
}
WebGLRenderingContextBase* context = V8WebGLRenderingContextBase::toNative(info.Holder());
WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(info.Holder());
unsigned pname = toInt32(info[0], exceptionState);
if (exceptionState.throwIfNeeded())
return;
......@@ -401,9 +401,9 @@ void V8WebGLRenderingContextBase::getParameterMethodCustom(const v8::FunctionCal
v8SetReturnValue(info, toV8Object(args, info.Holder(), info.GetIsolate()));
}
void V8WebGLRenderingContextBase::getProgramParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::getProgramParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getProgramParameter", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getProgramParameter", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
if (info.Length() != 2) {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
exceptionState.throwIfNeeded();
......@@ -411,7 +411,7 @@ void V8WebGLRenderingContextBase::getProgramParameterMethodCustom(const v8::Func
}
const int programArgumentIndex = 0;
WebGLRenderingContextBase* context = V8WebGLRenderingContextBase::toNative(info.Holder());
WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(info.Holder());
if (info.Length() > 0 && !isUndefinedOrNull(info[programArgumentIndex]) && !V8WebGLProgram::hasInstance(info[programArgumentIndex], info.GetIsolate())) {
exceptionState.throwTypeError(ExceptionMessages::argumentNullOrIncorrectType(programArgumentIndex + 1, "WebGLProgram"));
exceptionState.throwIfNeeded();
......@@ -425,15 +425,15 @@ void V8WebGLRenderingContextBase::getProgramParameterMethodCustom(const v8::Func
v8SetReturnValue(info, toV8Object(args, info.Holder(), info.GetIsolate()));
}
void V8WebGLRenderingContextBase::getRenderbufferParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::getRenderbufferParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getRenderbufferParameter", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getRenderbufferParameter", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
getObjectParameter(info, kRenderbuffer, exceptionState);
}
void V8WebGLRenderingContextBase::getShaderParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::getShaderParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getShaderParameter", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getShaderParameter", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
if (info.Length() != 2) {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
exceptionState.throwIfNeeded();
......@@ -441,7 +441,7 @@ void V8WebGLRenderingContextBase::getShaderParameterMethodCustom(const v8::Funct
}
const int shaderArgumentIndex = 0;
WebGLRenderingContextBase* context = V8WebGLRenderingContextBase::toNative(info.Holder());
WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(info.Holder());
if (info.Length() > 0 && !isUndefinedOrNull(info[shaderArgumentIndex]) && !V8WebGLShader::hasInstance(info[shaderArgumentIndex], info.GetIsolate())) {
exceptionState.throwTypeError(ExceptionMessages::argumentNullOrIncorrectType(shaderArgumentIndex + 1, "WebGLShader"));
exceptionState.throwIfNeeded();
......@@ -455,9 +455,9 @@ void V8WebGLRenderingContextBase::getShaderParameterMethodCustom(const v8::Funct
v8SetReturnValue(info, toV8Object(args, info.Holder(), info.GetIsolate()));
}
void V8WebGLRenderingContextBase::getSupportedExtensionsMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::getSupportedExtensionsMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
WebGLRenderingContextBase* impl = V8WebGLRenderingContextBase::toNative(info.Holder());
WebGLRenderingContext* impl = V8WebGLRenderingContext::toNative(info.Holder());
if (impl->isContextLost()) {
v8SetReturnValueNull(info);
return;
......@@ -470,15 +470,15 @@ void V8WebGLRenderingContextBase::getSupportedExtensionsMethodCustom(const v8::F
v8SetReturnValue(info, array);
}
void V8WebGLRenderingContextBase::getTexParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::getTexParameterMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getTexParameter", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getTexParameter", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
getObjectParameter(info, kTexture, exceptionState);
}
void V8WebGLRenderingContextBase::getUniformMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::getUniformMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getUniform", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getUniform", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
if (info.Length() != 2) {
exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
exceptionState.throwIfNeeded();
......@@ -486,7 +486,7 @@ void V8WebGLRenderingContextBase::getUniformMethodCustom(const v8::FunctionCallb
}
const int programArgumentIndex = 0;
WebGLRenderingContextBase* context = V8WebGLRenderingContextBase::toNative(info.Holder());
WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(info.Holder());
if (info.Length() > 0 && !isUndefinedOrNull(info[programArgumentIndex]) && !V8WebGLProgram::hasInstance(info[programArgumentIndex], info.GetIsolate())) {
exceptionState.throwTypeError(ExceptionMessages::argumentNullOrIncorrectType(programArgumentIndex + 1, "WebGLProgram"));
exceptionState.throwIfNeeded();
......@@ -507,9 +507,9 @@ void V8WebGLRenderingContextBase::getUniformMethodCustom(const v8::FunctionCallb
v8SetReturnValue(info, toV8Object(args, info.Holder(), info.GetIsolate()));
}
void V8WebGLRenderingContextBase::getVertexAttribMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::getVertexAttribMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getVertexAttrib", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "getVertexAttrib", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
getObjectParameter(info, kVertexAttrib, exceptionState);
}
......@@ -575,7 +575,7 @@ static void vertexAttribAndUniformHelperf(const v8::FunctionCallbackInfo<v8::Val
location = toWebGLUniformLocation(info[uniformLocationArgumentIndex], info.GetIsolate());
}
WebGLRenderingContextBase* context = V8WebGLRenderingContextBase::toNative(info.Holder());
WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(info.Holder());
const int indexArrayArgument = 1;
if (V8Float32Array::hasInstance(info[indexArrayArgument], info.GetIsolate())) {
......@@ -644,7 +644,7 @@ static void uniformHelperi(const v8::FunctionCallbackInfo<v8::Value>& info, Func
}
const int uniformLocationArgumentIndex = 0;
WebGLRenderingContextBase* context = V8WebGLRenderingContextBase::toNative(info.Holder());
WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(info.Holder());
if (info.Length() > 0 && !isUndefinedOrNull(info[uniformLocationArgumentIndex]) && !V8WebGLUniformLocation::hasInstance(info[uniformLocationArgumentIndex], info.GetIsolate())) {
exceptionState.throwTypeError(ExceptionMessages::argumentNullOrIncorrectType(uniformLocationArgumentIndex + 1, "WebGLUniformLocation"));
exceptionState.throwIfNeeded();
......@@ -692,51 +692,51 @@ static void uniformHelperi(const v8::FunctionCallbackInfo<v8::Value>& info, Func
fastFree(data);
}
void V8WebGLRenderingContextBase::uniform1fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::uniform1fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform1fv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform1fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
vertexAttribAndUniformHelperf(info, kUniform1v, exceptionState);
}
void V8WebGLRenderingContextBase::uniform1ivMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::uniform1ivMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform1iv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform1iv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
uniformHelperi(info, kUniform1v, exceptionState);
}
void V8WebGLRenderingContextBase::uniform2fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::uniform2fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform2fv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform2fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
vertexAttribAndUniformHelperf(info, kUniform2v, exceptionState);
}
void V8WebGLRenderingContextBase::uniform2ivMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::uniform2ivMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform2iv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform2iv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
uniformHelperi(info, kUniform2v, exceptionState);
}
void V8WebGLRenderingContextBase::uniform3fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::uniform3fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform3fv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform3fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
vertexAttribAndUniformHelperf(info, kUniform3v, exceptionState);
}
void V8WebGLRenderingContextBase::uniform3ivMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::uniform3ivMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform3iv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform3iv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
uniformHelperi(info, kUniform3v, exceptionState);
}
void V8WebGLRenderingContextBase::uniform4fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::uniform4fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform4fv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform4fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
vertexAttribAndUniformHelperf(info, kUniform4v, exceptionState);
}
void V8WebGLRenderingContextBase::uniform4ivMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::uniform4ivMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform4iv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniform4iv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
uniformHelperi(info, kUniform4v, exceptionState);
}
......@@ -757,7 +757,7 @@ static void uniformMatrixHelper(const v8::FunctionCallbackInfo<v8::Value>& info,
return;
}
WebGLRenderingContextBase* context = V8WebGLRenderingContextBase::toNative(info.Holder());
WebGLRenderingContext* context = V8WebGLRenderingContext::toNative(info.Holder());
const int uniformLocationArgumentIndex = 0;
if (info.Length() > 0 && !isUndefinedOrNull(info[uniformLocationArgumentIndex]) && !V8WebGLUniformLocation::hasInstance(info[uniformLocationArgumentIndex], info.GetIsolate())) {
......@@ -806,45 +806,45 @@ static void uniformMatrixHelper(const v8::FunctionCallbackInfo<v8::Value>& info,
fastFree(data);
}
void V8WebGLRenderingContextBase::uniformMatrix2fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::uniformMatrix2fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniformMatrix2fv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniformMatrix2fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
uniformMatrixHelper(info, 2, exceptionState);
}
void V8WebGLRenderingContextBase::uniformMatrix3fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::uniformMatrix3fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniformMatrix3fv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniformMatrix3fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
uniformMatrixHelper(info, 3, exceptionState);
}
void V8WebGLRenderingContextBase::uniformMatrix4fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::uniformMatrix4fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniformMatrix4fv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "uniformMatrix4fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
uniformMatrixHelper(info, 4, exceptionState);
}
void V8WebGLRenderingContextBase::vertexAttrib1fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::vertexAttrib1fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "vertexAttrib1fv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "vertexAttrib1fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
vertexAttribAndUniformHelperf(info, kVertexAttrib1v, exceptionState);
}
void V8WebGLRenderingContextBase::vertexAttrib2fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::vertexAttrib2fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "vertexAttrib2fv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "vertexAttrib2fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
vertexAttribAndUniformHelperf(info, kVertexAttrib2v, exceptionState);
}
void V8WebGLRenderingContextBase::vertexAttrib3fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::vertexAttrib3fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "vertexAttrib3fv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "vertexAttrib3fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
vertexAttribAndUniformHelperf(info, kVertexAttrib3v, exceptionState);
}
void V8WebGLRenderingContextBase::vertexAttrib4fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8WebGLRenderingContext::vertexAttrib4fvMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "vertexAttrib4fv", "WebGLRenderingContextBase", info.Holder(), info.GetIsolate());
ExceptionState exceptionState(ExceptionState::ExecutionContext, "vertexAttrib4fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate());
vertexAttribAndUniformHelperf(info, kVertexAttrib4v, exceptionState);
}
......
......@@ -246,7 +246,6 @@
'html/canvas/WebGLProgram.idl',
'html/canvas/WebGLRenderbuffer.idl',
'html/canvas/WebGLRenderingContext.idl',
'html/canvas/WebGLRenderingContextBase.idl',
'html/canvas/WebGLShader.idl',
'html/canvas/WebGLShaderPrecisionFormat.idl',
'html/canvas/WebGLTexture.idl',
......@@ -465,6 +464,7 @@
'frame/WindowEventHandlers.idl',
'frame/WindowTimers.idl',
'html/canvas/CanvasPathMethods.idl',
'html/canvas/WebGLRenderingContextBase.idl',
'page/WindowPagePopup.idl',
'svg/SVGDocument.idl',
'svg/SVGFilterPrimitiveStandardAttributes.idl',
......
......@@ -26,11 +26,12 @@
#ifndef WebGLRenderingContext_h
#define WebGLRenderingContext_h
#include "bindings/v8/ScriptWrappable.h"
#include "core/html/canvas/WebGLRenderingContextBase.h"
namespace WebCore {
class WebGLRenderingContext FINAL : public WebGLRenderingContextBase {
class WebGLRenderingContext FINAL : public ScriptWrappable, public WebGLRenderingContextBase {
public:
static PassOwnPtr<WebGLRenderingContext> create(HTMLCanvasElement*, WebGLContextAttributes*);
virtual ~WebGLRenderingContext();
......
......@@ -23,5 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
interface WebGLRenderingContext : WebGLRenderingContextBase {
};
[
DoNotCheckConstants,
StrictTypeChecking,
] interface WebGLRenderingContext { };
WebGLRenderingContext implements WebGLRenderingContextBase;
......@@ -516,7 +516,6 @@ WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement* passedCa
, m_onePlusMaxNonDefaultTextureUnit(0)
{
ASSERT(m_context);
ScriptWrappable::init(this);
m_contextGroup = WebGLContextGroup::create();
m_contextGroup->addContext(this);
......
......@@ -26,7 +26,6 @@
#ifndef WebGLRenderingContextBase_h
#define WebGLRenderingContextBase_h
#include "bindings/v8/ScriptWrappable.h"
#include "core/dom/ActiveDOMObject.h"
#include "core/html/canvas/CanvasRenderingContext.h"
#include "core/html/canvas/WebGLExtensionName.h"
......@@ -95,7 +94,7 @@ class WebGLVertexArrayObjectOES;
class WebGLRenderingContextLostCallback;
class WebGLRenderingContextErrorMessageCallback;
class WebGLRenderingContextBase: public ScriptWrappable, public CanvasRenderingContext, public ActiveDOMObject, private Page::MultisamplingChangedObserver {
class WebGLRenderingContextBase: public CanvasRenderingContext, public ActiveDOMObject, private Page::MultisamplingChangedObserver {
public:
virtual ~WebGLRenderingContextBase();
......
......@@ -40,8 +40,9 @@ typedef /*unrestricted*/ float GLclampf;
[
DoNotCheckConstants,
ImplementedInBaseClass,
NoInterfaceObject,
StrictTypeChecking,
NoInterfaceObject
] interface WebGLRenderingContextBase {
readonly attribute HTMLCanvasElement canvas;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment