New issue
Advanced search Search tips

Issue 781257 link

Starred by 8 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: ----

Blocked on: View detail
issue 650150
issue 839389
issue 820353

Blocking:
issue 835571
issue 835762


Participants' hotlists:
Hotlist-Bindings-IDLCompiler


Sign in to add a comment

[WebIDL] Add support for WebIDL mixins

Reported by tobie.la...@gmail.com, Nov 3 2017

Issue description

Hi all!

WebIDL recently introduced dedicated syntax for mixins[0].

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

You can read more about it in the spec [2].

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;

We're filing issues against specs which use the deprecated syntax, but we welcome help to warn editors about these changes.

We also filed an issue against widlparser here: plinss/widlparser#32.

Please feel free to reach out if you have any questions.

Thanks!

[0]: https://github.com/heycam/webidl/commit/45e8173d40ddff8dcf81697326e094bcf8b92920
[1]: https://heycam.github.io/webidl/#NoInterfaceObject
[2]: https://heycam.github.io/webidl/#idl-interface-mixins



This is tracked in: https://github.com/heycam/webidl/issues/472
The original pull-request: https://github.com/heycam/webidl/pull/433

 
Cc: peria@chromium.org bashi@chromium.org
Labels: Pri-2
Status: Available (was: Untriaged)
Marking as available, cc-ing WebIDL compiler folks.

This seems like syntactic sugar that wouldn't actually block a feature from shipping (everything can be written without mixins), but would be convenient to support from the perspective of our IDL matching spec IDL.

Comment 2 by peria@chromium.org, Nov 6 2017

Owner: peria@chromium.org
Status: Assigned (was: Available)

Comment 3 by peria@chromium.org, Nov 20 2017

Blockedon: 650150
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ec53e05949f7ff894bc21ac467d8a74a85df9bd3

commit ec53e05949f7ff894bc21ac467d8a74a85df9bd3
Author: Hitoshi Yoshida <peria@chromium.org>
Date: Thu Mar 08 07:39:31 2018

idl parser: Update IDL parser to accept interface mixin

interface mixin is a new IDL feature, and has a new grammar definition.
This CL updates IDL parser to accept it.
https://heycam.github.io/webidl/#idl-interface-mixins

Bug: 781257
Change-Id: Ibb771007c9147cf868995c80db8afc4ca43b9a74
Reviewed-on: https://chromium-review.googlesource.com/954763
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541753}
[modify] https://crrev.com/ec53e05949f7ff894bc21ac467d8a74a85df9bd3/tools/idl_parser/idl_lexer.py
[modify] https://crrev.com/ec53e05949f7ff894bc21ac467d8a74a85df9bd3/tools/idl_parser/idl_parser.py
[modify] https://crrev.com/ec53e05949f7ff894bc21ac467d8a74a85df9bd3/tools/idl_parser/idl_parser_test.py
[modify] https://crrev.com/ec53e05949f7ff894bc21ac467d8a74a85df9bd3/tools/idl_parser/test_lexer/keywords.in
[modify] https://crrev.com/ec53e05949f7ff894bc21ac467d8a74a85df9bd3/tools/idl_parser/test_parser/interface_web.idl

Comment 5 by peria@chromium.org, Mar 9 2018

Blockedon: 820353
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/14b7c9249e7169035ed9cec39e0bd973b6a1ea80

commit 14b7c9249e7169035ed9cec39e0bd973b6a1ea80
Author: Hitoshi Yoshida <peria@chromium.org>
Date: Sat Mar 10 17:57:51 2018

idl: Update IDL parser to accept includes

"includes" statement is newly defined in Web IDL grammar.
This CL updates IDL parser to accept it as a correct tree.


Bug: 781257
Change-Id: I934764ee6698d34a6852138235d8f71641e2d3fe
Reviewed-on: https://chromium-review.googlesource.com/955702
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542378}
[modify] https://crrev.com/14b7c9249e7169035ed9cec39e0bd973b6a1ea80/third_party/WebKit/Source/modules/indexeddb/IDBKeyRange.idl
[modify] https://crrev.com/14b7c9249e7169035ed9cec39e0bd973b6a1ea80/tools/idl_parser/idl_lexer.py
[modify] https://crrev.com/14b7c9249e7169035ed9cec39e0bd973b6a1ea80/tools/idl_parser/idl_parser.py
[modify] https://crrev.com/14b7c9249e7169035ed9cec39e0bd973b6a1ea80/tools/idl_parser/test_parser/interface_web.idl

Blocking: 835762
Blocking: 835571

Comment 9 by peria@chromium.org, May 3 2018

Blockedon: 839389

Comment 10 by peria@chromium.org, May 25 2018

Labels: Hotlist-Bindings-IDLCompiler
Project Member

Comment 11 by bugdroid1@chromium.org, Jul 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4bee023e8b92040423040fafd6488a46dbcdab53

commit 4bee023e8b92040423040fafd6488a46dbcdab53
Author: Hitoshi Yoshida <peria@chromium.org>
Date: Mon Jul 02 02:54:24 2018

IDL parser: Accept partial interface mixin

Before this CL, we took "partial interface mixin" a syntax error,
but Web IDL spec now accepts it to extend interface mixins.
This CL updates parser to accept it, and merges InterfaceMixin
class into Interface class.

Bug: 781257
Change-Id: I2b8584d5a1d4b8d2ffd53ba6a80c39e19feae11e
Reviewed-on: https://chromium-review.googlesource.com/1119744
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571808}
[modify] https://crrev.com/4bee023e8b92040423040fafd6488a46dbcdab53/tools/idl_parser/idl_parser.py
[modify] https://crrev.com/4bee023e8b92040423040fafd6488a46dbcdab53/tools/idl_parser/test_parser/interface_web.idl

peria@, has this been fixed? Can I use interface mixins in IDL files now?
Cc: timothygu@chromium.org
I'm sorry, we can't use interface mixin nor includes yet.
You still need to use [NoInterfaceObject] and implements, as in #0.
 Issue 656517  has been merged into this issue.

Sign in to add a comment