mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Implement file-type functionalities in htmlinputelement and related
Changes include: - Implement file selection and other DOM behaviours in htmlinputelement - Integrate IpcSender<FileManagerThreadMsg> into ResourceThreads - Improve filemanager_thread, including adding type_string field to SelectedFile - Improve interfaces in FileList/File/Blob to accommodate the above changes
This commit is contained in:
parent
983612751b
commit
dd590d088b
10 changed files with 155 additions and 30 deletions
|
@ -27,8 +27,10 @@ impl FileList {
|
|||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(window: &Window, files: Vec<JS<File>>) -> Root<FileList> {
|
||||
reflect_dom_object(box FileList::new_inherited(files), GlobalRef::Window(window), FileListBinding::Wrap)
|
||||
pub fn new(window: &Window, files: Vec<Root<File>>) -> Root<FileList> {
|
||||
reflect_dom_object(box FileList::new_inherited(files.iter().map(|r| JS::from_rooted(&r)).collect()),
|
||||
GlobalRef::Window(window),
|
||||
FileListBinding::Wrap)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue