Bug 108906
Summary: | 'dictionary' should be supported by WebKit IDL | ||
---|---|---|---|
Product: | WebKit | Reporter: | Kentaro Hara <haraken> |
Component: | WebCore JavaScript | Assignee: | Antonio Gomes <tonikitoo> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | annevk, ap, a.renevier, cdumez, eoconnor, haraken, igor.oliveira, laszlo.gombos, tonikitoo |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 111911 | ||
Bug Blocks: |
Kentaro Hara
Web IDL spec: http://www.w3.org/TR/WebIDL/#idl-dictionaries
Use cases: https://cvs.khronos.org/svn/repos/registry/trunk/public/webcl/spec/latest/index.html
Currently 'dictionary' is parsed by IDLParser.pm but it is ignored by code generators.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Kentaro Hara
FYI, there had been a plan to use 'dictionary' for event constructors. There should be other use cases in the future.
Antonio Gomes
Kentaro told me, @nbarth won't be able to work on this for now. Taking ...
Alexey Proskuryakov
WebCrypto uses dictionaries too.
That said, it seems unclear how "dictionary" is different from "interface", except for minor syntactic sugar. Can someone please explain?
Alexey Proskuryakov
Or rather how it's different from Object, I guess.
Antonio Gomes
(In reply to comment #3)
> WebCrypto uses dictionaries too.
>
> That said, it seems unclear how "dictionary" is different from "interface", except for minor syntactic sugar. Can someone please explain?
That is a good question. I would say a 'dictionary' is the as a strong-typed 'interface with only read-only parameters'.
For example:
- in JS: var a = {x: bleh, y: blah};
- in c++:
the dictionary would have "x" member variable defined whose type is a Bleh class. IDL would have something like:
dictionary Foo {
Bleh x;
Blah y;
}
Based on the, the the binding could do the casts needed.
Please correct if I am wrong. It lacks a formal definition in WebIDL as far as I can tell.
Anne van Kesteren
Looking at how this works for addEventListener() this appears to be resolved.