<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>108906</bug_id>
          
          <creation_ts>2013-02-04 22:07:21 -0800</creation_ts>
          <short_desc>&apos;dictionary&apos; should be supported by WebKit IDL</short_desc>
          <delta_ts>2023-05-28 09:22:32 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore JavaScript</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>111911</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kentaro Hara">haraken</reporter>
          <assigned_to name="Antonio Gomes">tonikitoo</assigned_to>
          <cc>annevk</cc>
    
    <cc>ap</cc>
    
    <cc>a.renevier</cc>
    
    <cc>cdumez</cc>
    
    <cc>eoconnor</cc>
    
    <cc>haraken</cc>
    
    <cc>igor.oliveira</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>825136</commentid>
    <comment_count>0</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2013-02-04 22:07:21 -0800</bug_when>
    <thetext>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 &apos;dictionary&apos; is parsed by IDLParser.pm but it is ignored by code generators.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>825144</commentid>
    <comment_count>1</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2013-02-04 22:15:54 -0800</bug_when>
    <thetext>FYI, there had been a plan to use &apos;dictionary&apos; for event constructors. There should be other use cases in the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>832703</commentid>
    <comment_count>2</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2013-02-13 20:36:11 -0800</bug_when>
    <thetext>Kentaro told me, @nbarth won&apos;t be able to work on this for now. Taking ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>938542</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-10-10 14:19:11 -0700</bug_when>
    <thetext>WebCrypto uses dictionaries too.

That said, it seems unclear how &quot;dictionary&quot; is different from &quot;interface&quot;, except for minor syntactic sugar. Can someone please explain?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>938549</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-10-10 14:37:59 -0700</bug_when>
    <thetext>Or rather how it&apos;s different from Object, I guess.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>938565</commentid>
    <comment_count>5</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2013-10-10 15:03:34 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; WebCrypto uses dictionaries too.
&gt; 
&gt; That said, it seems unclear how &quot;dictionary&quot; is different from &quot;interface&quot;, except for minor syntactic sugar. Can someone please explain?

That is a good question. I would say a &apos;dictionary&apos; is the as a strong-typed &apos;interface with only read-only parameters&apos;.

For example:

- in JS: var a = {x: bleh, y: blah};
- in c++:
the dictionary would have &quot;x&quot; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1958524</commentid>
    <comment_count>6</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-05-28 09:22:32 -0700</bug_when>
    <thetext>Looking at how this works for addEventListener() this appears to be resolved.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>