diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-26 01:32:40 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-26 09:49:08 +0200 |
commit | 577370746e2ce3da7fa25a20b8e1bbeed319df65 (patch) | |
tree | 8082a48e08b01ad5fbfc29b4bfaf4a47f42f2889 /components/script/dom/blob.rs | |
parent | 9a7ba89c841cc9ea2e2500813aa844b4d9c35828 (diff) | |
download | servo-577370746e2ce3da7fa25a20b8e1bbeed319df65.tar.gz servo-577370746e2ce3da7fa25a20b8e1bbeed319df65.zip |
Rename DOMRefCell<T> to DomRefCell<T>
I don't want to do such a gratuitous rename, but with all the other types
now having "Dom" as part of their name, and especially with "DomOnceCell",
I feel like the other cell type that we already have should also follow
the convention. That argument loses weight though when we realise there
is still DOMString and other things.
Diffstat (limited to 'components/script/dom/blob.rs')
-rw-r--r-- | components/script/dom/blob.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/blob.rs b/components/script/dom/blob.rs index 835c17c9334..7317f9f8d56 100644 --- a/components/script/dom/blob.rs +++ b/components/script/dom/blob.rs @@ -2,7 +2,7 @@ * 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::cell::DOMRefCell; +use dom::bindings::cell::DomRefCell; use dom::bindings::codegen::Bindings::BlobBinding; use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods; use dom::bindings::codegen::UnionTypes::BlobOrString; @@ -27,7 +27,7 @@ use uuid::Uuid; pub struct FileBlob { id: Uuid, name: Option<PathBuf>, - cache: DOMRefCell<Option<Vec<u8>>>, + cache: DomRefCell<Option<Vec<u8>>>, size: u64, } @@ -59,7 +59,7 @@ impl BlobImpl { BlobImpl::File(FileBlob { id: file_id, name: Some(name), - cache: DOMRefCell::new(None), + cache: DomRefCell::new(None), size: size, }) } @@ -70,7 +70,7 @@ impl BlobImpl { pub struct Blob { reflector_: Reflector, #[ignore_heap_size_of = "No clear owner"] - blob_impl: DOMRefCell<BlobImpl>, + blob_impl: DomRefCell<BlobImpl>, /// content-type string type_string: String, } @@ -88,7 +88,7 @@ impl Blob { pub fn new_inherited(blob_impl: BlobImpl, type_string: String) -> Blob { Blob { reflector_: Reflector::new(), - blob_impl: DOMRefCell::new(blob_impl), + blob_impl: DomRefCell::new(blob_impl), // NOTE: Guarding the format correctness here, // https://w3c.github.io/FileAPI/#dfn-type type_string: normalize_type_string(&type_string), @@ -237,7 +237,7 @@ impl Blob { *self.blob_impl.borrow_mut() = BlobImpl::File(FileBlob { id: id.clone(), name: None, - cache: DOMRefCell::new(Some(bytes.to_vec())), + cache: DomRefCell::new(Some(bytes.to_vec())), size: bytes.len() as u64, }); id @@ -262,7 +262,7 @@ impl Blob { *self.blob_impl.borrow_mut() = BlobImpl::File(FileBlob { id: new_id.clone(), name: None, - cache: DOMRefCell::new(None), + cache: DomRefCell::new(None), size: rel_pos.to_abs_range(parent_len as usize).len() as u64, }); |