diff options
author | Jack Moffitt <jack@metajack.im> | 2014-08-28 09:34:23 -0600 |
---|---|---|
committer | Jack Moffitt <jack@metajack.im> | 2014-09-08 20:21:42 -0600 |
commit | c6ab60dbfc6da7b4f800c9e40893c8b58413960c (patch) | |
tree | d1d74076cf7fa20e4f77ec7cb82cae98b67362cb /src/components/script/dom/blob.rs | |
parent | db2f642c32fc5bed445bb6f2e45b0f6f0b4342cf (diff) | |
download | servo-c6ab60dbfc6da7b4f800c9e40893c8b58413960c.tar.gz servo-c6ab60dbfc6da7b4f800c9e40893c8b58413960c.zip |
Cargoify servo
Diffstat (limited to 'src/components/script/dom/blob.rs')
-rw-r--r-- | src/components/script/dom/blob.rs | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/components/script/dom/blob.rs b/src/components/script/dom/blob.rs deleted file mode 100644 index 1a7d2a21636..00000000000 --- a/src/components/script/dom/blob.rs +++ /dev/null @@ -1,59 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -use dom::bindings::codegen::InheritTypes::FileDerived; -use dom::bindings::global::GlobalRef; -use dom::bindings::js::Temporary; -use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; -use dom::bindings::error::Fallible; -use dom::bindings::codegen::Bindings::BlobBinding; - -#[deriving(Encodable)] -pub enum BlobType { - BlobTypeId, - FileTypeId -} - -#[deriving(Encodable)] -pub struct Blob { - reflector_: Reflector, - type_: BlobType -} - -impl Blob { - pub fn new_inherited() -> Blob { - Blob { - reflector_: Reflector::new(), - type_: BlobTypeId - } - } - - pub fn new(global: &GlobalRef) -> Temporary<Blob> { - reflect_dom_object(box Blob::new_inherited(), - global, - BlobBinding::Wrap) - } - - pub fn Constructor(global: &GlobalRef) -> Fallible<Temporary<Blob>> { - Ok(Blob::new(global)) - } -} - -pub trait BlobMethods { -} - -impl Reflectable for Blob { - fn reflector<'a>(&'a self) -> &'a Reflector { - &self.reflector_ - } -} - -impl FileDerived for Blob { - fn is_file(&self) -> bool { - match self.type_ { - FileTypeId => true, - _ => false - } - } -} |