mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Replaced DOMString constructor by conversion functions.
Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
This commit is contained in:
parent
736323a779
commit
84bde75b42
64 changed files with 256 additions and 254 deletions
|
@ -256,7 +256,7 @@ impl HTMLCanvasElementMethods for HTMLCanvasElement {
|
|||
|
||||
// Step 2.
|
||||
if self.Width() == 0 || self.Height() == 0 {
|
||||
return Ok(DOMString("data:,".to_owned()));
|
||||
return Ok(DOMString::from("data:,"));
|
||||
}
|
||||
|
||||
// Step 3.
|
||||
|
@ -277,7 +277,7 @@ impl HTMLCanvasElementMethods for HTMLCanvasElement {
|
|||
}
|
||||
|
||||
let encoded = encoded.to_base64(STANDARD);
|
||||
Ok(DOMString(format!("data:{};base64,{}", mime_type, encoded)))
|
||||
Ok(DOMString::from(format!("data:{};base64,{}", mime_type, encoded)))
|
||||
} else {
|
||||
Err(Error::NotSupported)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue