[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
⛆ |
|
|
,
Nov 6 2017
,
Nov 20 2017
,
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
,
Mar 9 2018
,
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
,
Apr 23 2018
,
Apr 23 2018
,
May 3 2018
,
May 25 2018
,
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
,
Aug 21
peria@, has this been fixed? Can I use interface mixins in IDL files now?
,
Aug 21
,
Aug 22
I'm sorry, we can't use interface mixin nor includes yet. You still need to use [NoInterfaceObject] and implements, as in #0.
,
Nov 2
Issue 656517 has been merged into this issue. |
|||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by jbroman@chromium.org
, Nov 3 2017Labels: Pri-2
Status: Available (was: Untriaged)