Re: [whatwg] More questions about the DnD API

2010-03-30 Thread Stef Epardaud
On Mon, Mar 29, 2010 at 02:04:22PM -0700, Daniel Cheng wrote: I'm still trying to use the DnD for a real-world use, and keep hitting problems. This is the HTML 5 draft at 7.9.4 Drag-and-drop processing model: From this point until the end of the drag-and-drop operation,

Re: [whatwg] More questions about the DnD API

2010-03-30 Thread Stef Epardaud
On Tue, Mar 30, 2010 at 01:31:15AM -0700, Daniel Cheng wrote: But then it's up to the developer to detect that the keys weren't pressed before (implement keydown events themselves), which is less practical. If you're copying the behavior of file managers, isn't it simply a

Re: [whatwg] More questions about the DnD API

2010-03-30 Thread Stef Epardaud
On Tue, Mar 30, 2010 at 02:33:07AM -0700, Daniel Cheng wrote: But what was the rationale for preventing key events while doing DnD? I'm not 100% sure, but I'm assume it's so that the process of dragging and dropping doesn't trigger unrelated mouse / keyboard listeners. Unrelated

[whatwg] More questions about the DnD API

2010-03-28 Thread Stef Epardaud
Hello, I didn't get any reaction to my previous email unfortunately since I think I brought up some valid points, but in any case I have some more feedback, so I keep sending :) I'm still trying to use the DnD for a real-world use, and keep hitting problems. This is the HTML 5 draft at 7.9.4

[whatwg] Limitations of the DnD API

2010-03-20 Thread Stef Epardaud
Hello, I'm trying to implement the picture reordering feature of picasa in HTML5 and I'm having several problems. The feature is as follows: - I have a list of small pictures arranged in a sequence of lines - I can select or unselect pictures by clicking them - I can drag the selected pictures

Re: [whatwg] canvas, img, file api and blobs

2010-02-17 Thread Stef Epardaud
On Tue, Feb 16, 2010 at 07:25:34PM +, Stefan Haustein wrote: We've been getting pretty good traction on Vlad's ArrayBuffers proposal, which was taken from the WebGL spec. Our current plan is to change the names in the browsers (WebKit, Chrome and Mozilla) to the non-WebGL

Re: [whatwg] canvas, img, file api and blobs

2010-02-16 Thread Stef Epardaud
On Tue, Feb 16, 2010 at 12:13:11AM -0800, Jonas Sicking wrote: On Mon, Feb 15, 2010 at 11:47 PM, Maciej Stachowiak m...@apple.com wrote: I still think we need a type for binary data that can represent in-memory resources. Blobs only allow asynchronous access, since they are meant to

Re: [whatwg] canvas, img, file api and blobs

2010-02-16 Thread Stef Epardaud
On Tue, Feb 16, 2010 at 10:23:09AM +0100, Anne van Kesteren wrote: It is XMLHttpRequest and being the editor and all I can assure you it will be modified the moment ECMA (or someone) gives us binary data in ECMAScript. I've been wanting to add that as both a sending and receiving type

Re: [whatwg] canvas, img, file api and blobs

2010-02-16 Thread Stef Epardaud
On Tue, Feb 16, 2010 at 01:47:04AM -0800, Jonas Sicking wrote: This is something I've been thinking about too. First of all, what is the use case? Once we have the FormData object, you will be able to submit processed files using XMLHttpRequest easily. So why do you want to use forms?

Re: [whatwg] canvas, img, file api and blobs

2010-02-16 Thread Stef Epardaud
On Tue, Feb 16, 2010 at 03:48:04AM -0800, Jonas Sicking wrote: If you have the FormData object [1], then why is it simpler to use form submission? [1] http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface Unless I'm missing the point, I find it simpler to use

Re: [whatwg] canvas, img, file api and blobs

2010-02-16 Thread Stef Epardaud
On Tue, Feb 16, 2010 at 04:10:38AM -0800, Jonas Sicking wrote: Ah, sorry, it is indeed the idea that you can get a pre-filled FormData from a form. Something like: formData = myForm.getFormData(); after which you can do: formData.append(thefile, myProcessedFile); xhr.send(formData);

Re: [whatwg] canvas, img, file api and blobs

2010-02-16 Thread Stef Epardaud
On Tue, Feb 16, 2010 at 01:24:14PM +0100, Anne van Kesteren wrote: You need to use scripts anyway and at this experimental stage it is not really clear whether your use case hits the 80/20 or is actually rather uncommon and can be dealt with using a jQuery wrapper or some such. Right, if

Re: [whatwg] canvas, img, file api and blobs

2010-02-16 Thread Stef Epardaud
On Tue, Feb 16, 2010 at 11:39:31AM -0500, Joel Webber wrote: And in particular, does it bear any resemblance to the WebGLArray interfaces, as proposed in ([3]http://people.mozilla.com/~vladimir/jsvec/TypedArray-spec.html)? I'm particularly concerned with the interfaces among all

[whatwg] canvas, img, file api and blobs

2010-02-15 Thread Stef Epardaud
Hello, I am trying to write a client-side application in HTML5 that resizes images before uploading them to the server. I saw several demos that did this resizing using canvas and img, but I have only seen how to get a data URL out of a canvas, and since Base64 is about 1.37% larger than the

Re: [whatwg] canvas, img, file api and blobs

2010-02-15 Thread Stef Epardaud
On Mon, Feb 15, 2010 at 05:16:43PM +0100, Anne van Kesteren wrote: You don't. The canvas is just a bitmap; it has no attached metadata. This could be changed, but various things would need to be defined about what happens when multiple images are drawn in, when images are drawn on top