Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update WebIDL definition in WebGL 2.0 to use new mixin syntax #2539

Closed
1 task
tobie opened this issue Nov 3, 2017 · 2 comments · Fixed by #2566
Closed
1 task

Update WebIDL definition in WebGL 2.0 to use new mixin syntax #2539

tobie opened this issue Nov 3, 2017 · 2 comments · Fixed by #2566

Comments

@tobie
Copy link

tobie commented Nov 3, 2017

Hi all!

WebIDL recently introduced dedicated syntax for mixins.

This syntax replaces the [NoInterfaceObject] extended attribute and implements statement which have been deprecated (except for a few legacy uses cases explicitely mentioned in the spec).

You can read more about it here.

In most cases, the changes should be relatively straightforward. The now deprecated:

interface Foo { };

[NoInterfaceObject]  // (Mostly) DEPRECATED
interface Bar { };
Foo implementes Bar; // DEPRECATED

should just be rewritten as:

interface Foo { };

interface mixin Bar { };
Foo includes Bar;

Additonaly, a section on when to use partials and mixins has been added to the spec. It's short and might be worth a read.

It seems the following interface in WebGL 2.0 is impacted by this change:

  • WebGL2RenderingContextBase

The suggested syntax change would be as follows:

interface mixin WebGL2RenderingContextBase {
  /* ... */
};

interface WebGL2RenderingContext { };
WebGL2RenderingContext includes WebGLRenderingContextBase;
WebGL2RenderingContext includes WebGL2RenderingContextBase;

We're sorry for the inconvenience this causes, but our hope is that this ultimately makes things simpler and clearer for everybody.

As always, please feel free to reach out if you have any questions.

Thanks!


Tracked in: whatwg/webidl#472 | Original pull-request: whatwg/webidl#433

@tobie tobie mentioned this issue Nov 3, 2017
4 tasks
@tobie tobie changed the title Update WebIDL definition(s) to use new mixin syntax Update WebIDL definition in WebGL 2.0 to use new mixin syntax Nov 3, 2017
romandev added a commit to romandev/WebGL that referenced this issue Dec 21, 2017
WebIDL recently introduced dedicated syntax for mixins [1]. This
replaces the existing [NoInterfaceObject] and "implements" syntax with
"interface mixin" and "includes" in the appropriate places.

This fixes KhronosGroup#2538, KhronosGroup#2539 issues.

[1] whatwg/webidl@45e8173
kenrussell pushed a commit that referenced this issue Jan 4, 2018
WebIDL recently introduced dedicated syntax for mixins [1]. This
replaces the existing [NoInterfaceObject] and "implements" syntax with
"interface mixin" and "includes" in the appropriate places.

This fixes #2538, #2539 issues.

[1] whatwg/webidl@45e8173
Richard-Yunchao pushed a commit to Richard-Yunchao/WebGL that referenced this issue Jan 12, 2018
WebIDL recently introduced dedicated syntax for mixins [1]. This
replaces the existing [NoInterfaceObject] and "implements" syntax with
"interface mixin" and "includes" in the appropriate places.

This fixes KhronosGroup#2538, KhronosGroup#2539 issues.

[1] whatwg/webidl@45e8173
@bzbarsky
Copy link

@kenrussell the new IDL isn't valid because it has a mixin including another mixin, no?

@kenrussell
Copy link
Member

@bzbarsky where do you see that?

WebGLRenderingContext and WebGL2RenderingContext are the two concrete interfaces, each of which includes multiple mixins. Those mixins don't include other ones.

If you see some problem please file a new issue referencing this one or, better, put up a pull request with a suggested fix. Thanks.

@bzbarsky
Copy link

@kenrussell I was looking at the changes made in #2566, which is what closed this issue.

It looks like since then the problem has been fixed in #2575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants