diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-07-15 13:30:19 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-07-15 15:33:57 +0200 |
commit | 829259fb794831167c9992bd6b1c71bf81bd8023 (patch) | |
tree | 4426dba3705cf976e4ead2310e8b34ebac162947 /src/components/script/dom/file.rs | |
parent | a14bb68c3f53ef5fbf562e145b60da46ece9fedc (diff) | |
download | servo-829259fb794831167c9992bd6b1c71bf81bd8023.tar.gz servo-829259fb794831167c9992bd6b1c71bf81bd8023.zip |
Introduce abstractions for global scopes.
Part of #2811.
Diffstat (limited to 'src/components/script/dom/file.rs')
-rw-r--r-- | src/components/script/dom/file.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/script/dom/file.rs b/src/components/script/dom/file.rs index ea2610c1f2f..4cf46e013af 100644 --- a/src/components/script/dom/file.rs +++ b/src/components/script/dom/file.rs @@ -3,10 +3,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::Bindings::FileBinding; +use dom::bindings::global::GlobalRef; use dom::bindings::js::{JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::blob::{Blob, BlobType, FileTypeId}; -use dom::window::Window; use servo_util::str::DOMString; #[deriving(Encodable)] @@ -17,7 +17,7 @@ pub struct File { } impl File { - pub fn new_inherited(global: &JSRef<Window>, _file_bits: &JSRef<Blob>, name: DOMString) -> File { + pub fn new_inherited(global: &GlobalRef, _file_bits: &JSRef<Blob>, name: DOMString) -> File { File { blob: Blob::new_inherited(global), name: name, @@ -27,7 +27,7 @@ impl File { // the relevant subfields of file_bits should be copied over } - pub fn new(global: &JSRef<Window>, file_bits: &JSRef<Blob>, name: DOMString) -> Temporary<File> { + pub fn new(global: &GlobalRef, file_bits: &JSRef<Blob>, name: DOMString) -> Temporary<File> { reflect_dom_object(box File::new_inherited(global, file_bits, name), global, FileBinding::Wrap) |