mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Replace typeString with type_string.
This commit is contained in:
parent
5ce3510a50
commit
e7ffbf819a
2 changed files with 7 additions and 7 deletions
|
@ -73,7 +73,7 @@ pub struct Blob {
|
||||||
#[ignore_heap_size_of = "No clear owner"]
|
#[ignore_heap_size_of = "No clear owner"]
|
||||||
blob_impl: DOMRefCell<BlobImpl>,
|
blob_impl: DOMRefCell<BlobImpl>,
|
||||||
/// content-type string
|
/// content-type string
|
||||||
typeString: String,
|
type_string: String,
|
||||||
isClosed_: Cell<bool>,
|
isClosed_: Cell<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,13 +85,13 @@ impl Blob {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new_inherited(blob_impl: BlobImpl, typeString: String) -> Blob {
|
pub fn new_inherited(blob_impl: BlobImpl, type_string: String) -> Blob {
|
||||||
Blob {
|
Blob {
|
||||||
reflector_: Reflector::new(),
|
reflector_: Reflector::new(),
|
||||||
blob_impl: DOMRefCell::new(blob_impl),
|
blob_impl: DOMRefCell::new(blob_impl),
|
||||||
// NOTE: Guarding the format correctness here,
|
// NOTE: Guarding the format correctness here,
|
||||||
// https://w3c.github.io/FileAPI/#dfn-type
|
// https://w3c.github.io/FileAPI/#dfn-type
|
||||||
typeString: normalize_type_string(&typeString),
|
type_string: normalize_type_string(&type_string),
|
||||||
isClosed_: Cell::new(false),
|
isClosed_: Cell::new(false),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,7 @@ impl Blob {
|
||||||
|
|
||||||
let blob_buf = BlobBuf {
|
let blob_buf = BlobBuf {
|
||||||
filename: None,
|
filename: None,
|
||||||
type_string: self.typeString.clone(),
|
type_string: self.type_string.clone(),
|
||||||
size: bytes.len() as u64,
|
size: bytes.len() as u64,
|
||||||
bytes: bytes.to_vec(),
|
bytes: bytes.to_vec(),
|
||||||
};
|
};
|
||||||
|
@ -366,7 +366,7 @@ impl BlobMethods for Blob {
|
||||||
|
|
||||||
// https://w3c.github.io/FileAPI/#dfn-type
|
// https://w3c.github.io/FileAPI/#dfn-type
|
||||||
fn Type(&self) -> DOMString {
|
fn Type(&self) -> DOMString {
|
||||||
DOMString::from(self.typeString.clone())
|
DOMString::from(self.type_string.clone())
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://w3c.github.io/FileAPI/#slice-method-algo
|
// https://w3c.github.io/FileAPI/#slice-method-algo
|
||||||
|
|
|
@ -25,9 +25,9 @@ pub struct File {
|
||||||
impl File {
|
impl File {
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
fn new_inherited(blob_impl: BlobImpl, name: DOMString,
|
fn new_inherited(blob_impl: BlobImpl, name: DOMString,
|
||||||
modified: Option<i64>, typeString: &str) -> File {
|
modified: Option<i64>, type_string: &str) -> File {
|
||||||
File {
|
File {
|
||||||
blob: Blob::new_inherited(blob_impl, typeString.to_owned()),
|
blob: Blob::new_inherited(blob_impl, type_string.to_owned()),
|
||||||
name: name,
|
name: name,
|
||||||
// https://w3c.github.io/FileAPI/#dfn-lastModified
|
// https://w3c.github.io/FileAPI/#dfn-lastModified
|
||||||
modified: match modified {
|
modified: match modified {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue