On 2016-03-16 9:20 AM, Zhen Zhang wrote:
Hi,

I have finished the first step “Draft" in the GSoC site and wonder if you can 
see my draft proposal now. Welcome any comments!

Beyond that, I have some more related questions:

1. I assume that this method 
https://github.com/servo/servo/blob/master/components/script/dom/htmlinputelement.rs#L858
 is where we should open the dialog and get the filenames, right? And there are 
also much TODOs left in htmlinputelement.rs, I think they are necessary for 
this project.
2. What should we do if a file is *really* big? If we are just reading it 
locally rather than sending it over network, I think a partial reading might be 
possible by controlling precisely the range in `std::io::Read`; If we send it 
over the network, I remember the spec talks about chunking and streaming the 
data — but is this related to this project at all?
3. About Blob URL, I image that the response doesn’t really contain anything in 
its body — the URL itself is used to dereference the object. So the Blob URL 
Store etc. are global state of UA, and is shared across the windows. Is my 
understanding right?
4. I mentioned the possibility of using KISS-UI as dialog for selecting a file, 
but it looks a bit heavyweight. What is your idea about this? And what is the 
rough plan about integration of UI components into the Servo now?

Thanks a lot

- Zhen

1. Yes. And yes, filling out some of the relevant TODOs in the HTMLInputElement code that would make the file input more useful could be valuable.

2. Presumably we'll want to support reading a file's contents only when necessary, rather than storing the contents in memory. The chunking mentioned in the spec would be a useful part of this project (assuming you're referring to https://w3c.github.io/FileAPI/#readOperation); I believe we perform a read of the entire blob contents right now.

3. Yes.

4. I would prefer to use native UI when possible. For pieces like the file chooser dialog, which do not need to integrate into the actual web content, this seems like a easy win in terms of integration effort. For UI that must integrate into web content (like text inputs), we currently try to approximate the native platform appearance and behaviour with CSS and native event handling.

Cheers,
Josh
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to