mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Generate the TypeId enums in codegen
This commit is contained in:
parent
55769b2fbf
commit
aab2c40389
107 changed files with 678 additions and 774 deletions
|
@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::FileBinding::FileMethods;
|
|||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::blob::{Blob, BlobTypeId};
|
||||
use dom::blob::Blob;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -17,11 +17,11 @@ pub struct File {
|
|||
}
|
||||
|
||||
impl File {
|
||||
fn new_inherited(global: GlobalRef, type_: BlobTypeId,
|
||||
fn new_inherited(global: GlobalRef,
|
||||
_file_bits: &Blob, name: DOMString) -> File {
|
||||
File {
|
||||
//TODO: get type from the underlying filesystem instead of "".to_string()
|
||||
blob: Blob::new_inherited(global, type_, None, ""),
|
||||
blob: Blob::new_inherited(global, None, ""),
|
||||
name: name,
|
||||
}
|
||||
// XXXManishearth Once Blob is able to store data
|
||||
|
@ -29,7 +29,7 @@ impl File {
|
|||
}
|
||||
|
||||
pub fn new(global: GlobalRef, file_bits: &Blob, name: DOMString) -> Root<File> {
|
||||
reflect_dom_object(box File::new_inherited(global, BlobTypeId::File, file_bits, name),
|
||||
reflect_dom_object(box File::new_inherited(global, file_bits, name),
|
||||
global,
|
||||
FileBinding::Wrap)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue