mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add global default method for Reflectable trait
This commit is contained in:
parent
2703568227
commit
ce6075825d
17 changed files with 88 additions and 83 deletions
|
@ -7,10 +7,10 @@ use dom::bindings::codegen::Bindings::FormDataBinding;
|
|||
use dom::bindings::codegen::Bindings::FormDataBinding::FormDataMethods;
|
||||
use dom::bindings::codegen::UnionTypes::BlobOrUSVString::{self, eBlob, eUSVString};
|
||||
use dom::bindings::error::{Fallible};
|
||||
use dom::bindings::global::{GlobalRef, global_root_from_reflector};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{JS, Root};
|
||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use dom::bindings::reflector::{Reflectable, Reflector, reflect_dom_object};
|
||||
use dom::bindings::str::USVString;
|
||||
use dom::blob::Blob;
|
||||
use dom::file::File;
|
||||
|
@ -126,7 +126,7 @@ impl FormData {
|
|||
fn get_file_or_blob(&self, value: &Blob, filename: Option<USVString>) -> Root<Blob> {
|
||||
match filename {
|
||||
Some(fname) => {
|
||||
let global = global_root_from_reflector(self);
|
||||
let global = self.global();
|
||||
let name = DOMString::from(fname.0);
|
||||
Root::upcast(File::new(global.r(), value, name))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue