Add support for unions in arguments and for optional arguments

This commit is contained in:
Anton Danilkin
2018-08-09 19:24:33 +03:00
parent f85fd0e2ad
commit 703b1ab91d
6 changed files with 710 additions and 320 deletions

View File

@ -31,8 +31,7 @@ interface WebGL2RenderingContext
{
};
[NoInterfaceObject]
interface WebGL2RenderingContextBase
interface mixin WebGL2RenderingContextBase
{
const GLenum READ_BUFFER = 0x0C02;
const GLenum UNPACK_ROW_LENGTH = 0x0CF2;
@ -694,8 +693,8 @@ interface WebGL2RenderingContextBase
void bindVertexArray(WebGLVertexArrayObject? array);
};
WebGL2RenderingContextBase implements WebGLRenderingContextBase;
WebGL2RenderingContext implements WebGL2RenderingContextBase;
WebGL2RenderingContextBase includes WebGLRenderingContextBase;
WebGL2RenderingContext includes WebGL2RenderingContextBase;
[NoInterfaceObject]
interface EXT_color_buffer_float {

View File

@ -111,8 +111,7 @@ typedef (Int32Array or sequence<GLint>) Int32List;
// WebGL2RenderingContext have in common. This doesn't have all the things they
// have in common, because we don't support splitting multiple overloads of the
// same method across separate interfaces and pulling them in with "implements".
[Exposed=(Window, Worker), NoInterfaceObject]
interface WebGLRenderingContextBase {
interface mixin WebGLRenderingContextBase {
/* ClearBufferMask */
const GLenum DEPTH_BUFFER_BIT = 0x00000100;
const GLenum STENCIL_BUFFER_BIT = 0x00000400;
@ -802,7 +801,7 @@ interface WebGLRenderingContext {
void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data);
};
WebGLRenderingContext implements WebGLRenderingContextBase;
WebGLRenderingContext includes WebGLRenderingContextBase;
// For OffscreenCanvas
// Reference: https://wiki.whatwg.org/wiki/OffscreenCanvas