mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Introduce Reflectable::global_scope
This commit is contained in:
parent
27f100b1d4
commit
ae6af5172b
30 changed files with 116 additions and 120 deletions
|
@ -146,8 +146,6 @@ impl FormDataMethods for FormData {
|
|||
|
||||
impl FormData {
|
||||
fn get_file(&self, blob: &Blob, opt_filename: Option<USVString>) -> Root<File> {
|
||||
let global = self.global();
|
||||
|
||||
let name = match opt_filename {
|
||||
Some(filename) => DOMString::from(filename.0),
|
||||
None => DOMString::from(""),
|
||||
|
@ -155,7 +153,7 @@ impl FormData {
|
|||
|
||||
let bytes = blob.get_bytes().unwrap_or(vec![]);
|
||||
|
||||
File::new(global.r().as_global_scope(), BlobImpl::new_from_bytes(bytes), name, None, "")
|
||||
File::new(&self.global_scope(), BlobImpl::new_from_bytes(bytes), name, None, "")
|
||||
}
|
||||
|
||||
pub fn datums(&self) -> Vec<FormDatum> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue