<?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>25994</bug_id>
          
          <creation_ts>2014-06-05 17:08:46 +0000</creation_ts>
          <short_desc>invalid extended attribute list syntax</short_desc>
          <delta_ts>2014-06-19 03:08:37 +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>File API</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Glenn Adams">glenn</reporter>
          <assigned_to name="Arun">arun</assigned_to>
          <cc>bzbarsky</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>107383</commentid>
    <comment_count>0</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2014-06-05 17:08:46 +0000</bug_when>
    <thetext>The extended attribute list syntax used in the File API does not adhere to current WebIDL specification syntax. In particular, production 64 of the syntax [1] must consist of a comma separated list of ExtendedAttribute items.

[1] http://heycam.github.io/webidl/#proddef-ExtendedAttributeList

In order to fix this, please make the following changes:

(1) on definition of Blob interface, change

[Exposed=Window,Worker][Constructor,
Constructor(sequence&lt;(ArrayBuffer or ArrayBufferView or Blob or DOMString)&gt; blobParts, optional BlobPropertyBag options)]

to 

[Constructor,
Constructor(sequence&lt;(ArrayBuffer or ArrayBufferView or Blob or DOMString)&gt; blobParts, optional BlobPropertyBag options),
Exposed=Window,Worker]

(2) on definition of File interface, change

[Exposed=Window,Worker][Constructor(sequence&lt;(Blob or DOMString or ArrayBufferView or ArrayBuffer)&gt; fileBits, [EnsureUTF16] DOMString fileName, optional FilePropertyBag options)]

to

[Constructor(sequence&lt;(Blob or DOMString or ArrayBufferView or ArrayBuffer)&gt; fileBits, [EnsureUTF16] DOMString fileName, optional FilePropertyBag options),
Exposed=Window,Worker]

(3) on definition of FileReader interface, change

[Exposed=Window,Worker][Constructor]

to

[Constructor, Exposed=Window,Worker]

(4) on definition of FileReaderSync interface, change

[Exposed=Worker][Constructor]

to

[Constructor, Exposed=Worker]

Note that I have also reordered the Exposed extended attribute above to improve readability (given that it can contain a &apos;,&apos; as well).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107387</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-06-05 17:19:30 +0000</bug_when>
    <thetext>Note that the syntax of Exposed will likely change, since the current one can&apos;t be parsed unambiguously.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107809</commentid>
    <comment_count>2</comment_count>
    <who name="Arun">arun</who>
    <bug_when>2014-06-13 20:35:55 +0000</bug_when>
    <thetext>(In reply to Boris Zbarsky from comment #1)
&gt; Note that the syntax of Exposed will likely change, since the current one
&gt; can&apos;t be parsed unambiguously.


bzbarsky, will it change in a way that&apos;s very different than the suggested correct syntax in the bug report by Glenn Adams? I admit I read WebIDL wrong, and created two sets of square brackets, one for extended attribute annotations and one for constructor. Should I leave this be till WebIDL decides on the correct syntax?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107821</commentid>
    <comment_count>3</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-06-13 23:22:39 +0000</bug_when>
    <thetext>&gt; will it change in a way that&apos;s very different than the suggested correct syntax
&gt; in the bug report by Glenn Adams

Unclear.  For now you should use what Glenn suggested, in any case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108026</commentid>
    <comment_count>4</comment_count>
    <who name="Arun">arun</who>
    <bug_when>2014-06-18 21:21:36 +0000</bug_when>
    <thetext>Fixed.

1. http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
2. http://dev.w3.org/2006/webapi/FileAPI/#dfn-file
3. http://dev.w3.org/2006/webapi/FileAPI/#dfn-filereader
4. http://dev.w3.org/2006/webapi/FileAPI/#readingOnThreads</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108048</commentid>
    <comment_count>5</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2014-06-19 03:08:37 +0000</bug_when>
    <thetext>Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>