Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-29 Thread Jonas Sicking
On Sat, Apr 28, 2012 at 7:54 AM, Glenn Maynard gl...@zewt.org wrote: On Sat, Apr 28, 2012 at 3:45 AM, Jonas Sicking jo...@sicking.cc wrote: We should not have readAsArryBufferView since there's a ton of different types of ArrayBufferViews. Instead we should just return an ArrayBuffer and let

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-28 Thread Jonas Sicking
On Fri, Apr 27, 2012 at 10:57 AM, Arun Ranganathan aranganat...@mozilla.com wrote: On Apr 27, 2012, at 1:28 AM, Anne van Kesteren wrote: On Fri, 27 Apr 2012 00:13:42 +0200, Arun Ranganathan aranganat...@mozilla.com wrote: The constructor will switch to use ArrayBufferView in lieu of

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-28 Thread Glenn Maynard
On Sat, Apr 28, 2012 at 3:45 AM, Jonas Sicking jo...@sicking.cc wrote: We should not have readAsArryBufferView since there's a ton of different types of ArrayBufferViews. Instead we should just return an ArrayBuffer and let people construct ArrayBufferViews or DataViews into that as they see

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-27 Thread Glenn Maynard
On Fri, Apr 27, 2012 at 12:28 AM, Anne van Kesteren ann...@opera.comwrote: On Fri, 27 Apr 2012 00:13:42 +0200, Arun Ranganathan aranganat...@mozilla.com wrote: The constructor will switch to use ArrayBufferView in lieu of ArrayBuffer, but the read method exposed on FileReader and

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-27 Thread Arun Ranganathan
On Apr 27, 2012, at 1:28 AM, Anne van Kesteren wrote: On Fri, 27 Apr 2012 00:13:42 +0200, Arun Ranganathan aranganat...@mozilla.com wrote: The constructor will switch to use ArrayBufferView in lieu of ArrayBuffer, but the read method exposed on FileReader and FileReaderSync will read files

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-26 Thread Arun Ranganathan
On Apr 24, 2012, at 7:00 PM, David Herman wrote: On Apr 24, 2012, at 3:53 PM, David Herman wrote: On Apr 12, 2012, at 2:48 PM, Arun Ranganathan wrote: I intend to add ArrayBufferView as a parameter to the Blob constructor . Would it be possible also to allow passing an ArrayBuffer with

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-26 Thread Anne van Kesteren
On Fri, 27 Apr 2012 00:13:42 +0200, Arun Ranganathan aranganat...@mozilla.com wrote: The constructor will switch to use ArrayBufferView in lieu of ArrayBuffer, but the read method exposed on FileReader and FileReaderSync will read files into memory as ArrayBuffers. Since the constructor is

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-24 Thread David Herman
On Apr 12, 2012, at 2:48 PM, Arun Ranganathan wrote: I intend to add ArrayBufferView as a parameter to the Blob constructor . Would it be possible also to allow passing an ArrayBuffer with an offset and length as an additional alternative? This would eliminate the need to create a view when

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-24 Thread David Herman
On Apr 24, 2012, at 3:53 PM, David Herman wrote: On Apr 12, 2012, at 2:48 PM, Arun Ranganathan wrote: I intend to add ArrayBufferView as a parameter to the Blob constructor . Would it be possible also to allow passing an ArrayBuffer with an offset and length as an additional alternative?

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-13 Thread Simon Pieters
On Thu, 12 Apr 2012 22:11:38 +0200, Eric U er...@google.com wrote: On Thu, Apr 12, 2012 at 12:54 PM, Anne van Kesteren ann...@opera.com wrote: On Thu, 12 Apr 2012 21:48:12 +0200, Boris Zbarsky bzbar...@mit.edu wrote: Because it's still in the current editor's draft and it's still in the

BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-12 Thread Boris Zbarsky
This should make it easier to append limited views; appending the .buffer is a footgun because it appends the whole buffer. -Boris

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-12 Thread Anne van Kesteren
On Thu, 12 Apr 2012 21:26:24 +0200, Boris Zbarsky bzbar...@mit.edu wrote: This should make it easier to append limited views; appending the .buffer is a footgun because it appends the whole buffer. Why are we still discussing BlobBuilder? I thought we discussed long ago it should be removed

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-12 Thread Boris Zbarsky
On 4/12/12 3:44 PM, Anne van Kesteren wrote: On Thu, 12 Apr 2012 21:26:24 +0200, Boris Zbarsky bzbar...@mit.edu wrote: This should make it easier to append limited views; appending the .buffer is a footgun because it appends the whole buffer. Why are we still discussing BlobBuilder? Because

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-12 Thread Boris Zbarsky
On 4/12/12 3:54 PM, Anne van Kesteren wrote: Blob with constructor is in http://dev.w3.org/2006/webapi/FileAPI/ Right. I'd ended up at the File Writer spec. I thought the idea was to not have BlobBuilder at all. Dunno. Is there content depending on it? -Boris

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-12 Thread Anne van Kesteren
On Thu, 12 Apr 2012 21:58:00 +0200, Boris Zbarsky bzbar...@mit.edu wrote: On 4/12/12 3:54 PM, Anne van Kesteren wrote: I thought the idea was to not have BlobBuilder at all. Dunno. Is there content depending on it? Maybe some browser specific demos or content, it's not implemented by

Re: BlobBuilder.append() should take ArrayBufferView in addition to ArrayBuffer

2012-04-12 Thread Eric U
On Thu, Apr 12, 2012 at 12:54 PM, Anne van Kesteren ann...@opera.com wrote: On Thu, 12 Apr 2012 21:48:12 +0200, Boris Zbarsky bzbar...@mit.edu wrote: Because it's still in the current editor's draft and it's still in the Gecko code and I was just reviewing a patch to it and saw the API?  ;)