mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Replace most ~"string"s with "string".to_owned().
This commit is contained in:
parent
660f7a016e
commit
25542e3f7e
35 changed files with 206 additions and 206 deletions
|
@ -129,18 +129,18 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
|
|||
|
||||
{
|
||||
// Step 3.
|
||||
let mut doc_type = DocumentType::new(~"html", None, None, &*doc).root();
|
||||
let mut doc_type = DocumentType::new("html".to_owned(), None, None, &*doc).root();
|
||||
assert!(doc_node.AppendChild(NodeCast::from_mut_ref(&mut *doc_type)).is_ok());
|
||||
}
|
||||
|
||||
{
|
||||
// Step 4.
|
||||
let mut doc_html = NodeCast::from_unrooted(HTMLHtmlElement::new(~"html", &*doc)).root();
|
||||
let mut doc_html = NodeCast::from_unrooted(HTMLHtmlElement::new("html".to_owned(), &*doc)).root();
|
||||
assert!(doc_node.AppendChild(&mut *doc_html).is_ok());
|
||||
|
||||
{
|
||||
// Step 5.
|
||||
let mut doc_head = NodeCast::from_unrooted(HTMLHeadElement::new(~"head", &*doc)).root();
|
||||
let mut doc_head = NodeCast::from_unrooted(HTMLHeadElement::new("head".to_owned(), &*doc)).root();
|
||||
assert!(doc_html.AppendChild(&mut *doc_head).is_ok());
|
||||
|
||||
// Step 6.
|
||||
|
@ -148,7 +148,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
|
|||
None => (),
|
||||
Some(title_str) => {
|
||||
// Step 6.1.
|
||||
let mut doc_title = NodeCast::from_unrooted(HTMLTitleElement::new(~"title", &*doc)).root();
|
||||
let mut doc_title = NodeCast::from_unrooted(HTMLTitleElement::new("title".to_owned(), &*doc)).root();
|
||||
assert!(doc_head.AppendChild(&mut *doc_title).is_ok());
|
||||
|
||||
// Step 6.2.
|
||||
|
@ -159,7 +159,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
|
|||
}
|
||||
|
||||
// Step 7.
|
||||
let mut doc_body = HTMLBodyElement::new(~"body", &*doc).root();
|
||||
let mut doc_body = HTMLBodyElement::new("body".to_owned(), &*doc).root();
|
||||
assert!(doc_html.AppendChild(NodeCast::from_mut_ref(&mut *doc_body)).is_ok());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue