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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>10336</bug_id>
          
          <creation_ts>2010-08-09 22:28:51 +0000</creation_ts>
          <short_desc>&quot;optional&quot; should be allowed even if subsequent arguments aren&apos;t optional</short_desc>
          <delta_ts>2010-10-28 04:23:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>WebIDL</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>37322</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-08-09 22:28:51 +0000</bug_when>
    <thetext>It should be possible to say:

  void drawImage(in HTMLImageElement image, in float dx, in float dy, in optional float dw, in float dh);

...so that it means the same as:

  void drawImage(in HTMLImageElement image, in float dx, in float dy);
  void drawImage(in HTMLImageElement image, in float dx, in float dy, in float dw, in float dh);

Basically, have &quot;optional&quot; means that if the argument is omitted, all subsequent ones must be too, but that if it is included, any subsequent arguments up to the next &quot;optional&quot; must be included.

Currently, &quot;optional&quot; can&apos;t be omitted on arguments after the first with &quot;optional&quot;, so the above isn&apos;t possible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41798</commentid>
    <comment_count>1</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2010-10-28 04:23:39 +0000</bug_when>
    <thetext>That is in fact what the spec used to allow (with [Optional], a long time ago).  I removed it because I deemed it confusing: it looks like you can omit dw but still specify dh.  The three overloaded operations make it much clearer, IMO.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>